<commit_before>package publish

import (
	"strconv"

	schema "github.com/grafana/metrictank/schema"
	"github.com/prometheus/client_golang/prometheus"
	"github.com/prometheus/client_golang/prometheus/promauto"
	log "github.com/sirupsen/logrus"
)

var (
	ingestedMetrics = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: "gateway",
		Name:      "samples_ingested_total",
		Help:      "Number of samples ingested",
	}, []string{"org"})
)

type Publisher interface {
	Publish(metrics []*schema.MetricData) error
	Type() string
}
<commit_msg>add docs to Publisher interface noting the expectations for published metrics<commit_after>package publish

import (
	"strconv"

	schema "github.com/grafana/metrictank/schema"
	"github.com/prometheus/client_golang/prometheus"
	"github.com/prometheus/client_golang/prometheus/promauto"
	log "github.com/sirupsen/logrus"
)

var (
	ingestedMetrics = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: "gateway",
		Name:      "samples_ingested_total",
		Help:      "Number of samples ingested",
	}, []string{"org"})
)

type Publisher interface {
	//Publish the given metrics.
	//Requires that the metric interval and ID have been set
	Publish(metrics []*schema.MetricData) error
	//Type returns the type of system the Publisher publishes to
	Type() string
}

{'fraction_non_alphanumeric': 0.11051829268292683, 'fraction_numerical': 0.0, 'mean_word_length': 4.995433789954338, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6568219', 'n_tokens_mistral': 456, 'n_tokens_neox': 429, 'n_words': 96}