diff --git a/.chloggen/lokiexporter-checkapi-26304.yaml b/.chloggen/lokiexporter-checkapi-26304.yaml new file mode 100755 index 000000000000..296b220b1034 --- /dev/null +++ b/.chloggen/lokiexporter-checkapi-26304.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: lokiexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Do not export the function `MetricViews` and pass checkapi. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [26304] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [api] \ No newline at end of file diff --git a/cmd/checkapi/allowlist.txt b/cmd/checkapi/allowlist.txt index 158a8bf1a1cc..68ac0308d181 100644 --- a/cmd/checkapi/allowlist.txt +++ b/cmd/checkapi/allowlist.txt @@ -3,7 +3,6 @@ exporter/awskinesisexporter exporter/coralogixexporter exporter/dynatraceexporter exporter/kafkaexporter -exporter/lokiexporter exporter/pulsarexporter exporter/sentryexporter exporter/sumologicexporter diff --git a/exporter/lokiexporter/factory.go b/exporter/lokiexporter/factory.go index 0d46ddbf0a9f..dce14b140890 100644 --- a/exporter/lokiexporter/factory.go +++ b/exporter/lokiexporter/factory.go @@ -21,7 +21,7 @@ import ( // NewFactory creates a factory for the legacy Loki exporter. func NewFactory() exporter.Factory { - _ = view.Register(MetricViews()...) + _ = view.Register(metricViews()...) return exporter.NewFactory( metadata.Type, diff --git a/exporter/lokiexporter/metrics.go b/exporter/lokiexporter/metrics.go index 8b90639547ac..456bbe2307d4 100644 --- a/exporter/lokiexporter/metrics.go +++ b/exporter/lokiexporter/metrics.go @@ -12,7 +12,7 @@ var ( lokiExporterFailedToSendLogRecordsDueToMissingLabels = stats.Int64("lokiexporter_send_failed_due_to_missing_labels", "Number of log records failed to send because labels were missing", stats.UnitDimensionless) ) -func MetricViews() []*view.View { +func metricViews() []*view.View { return []*view.View{ { Name: "lokiexporter_send_failed_due_to_missing_labels",