Skip to content

Commit

Permalink
feat: set otlp as default format for logs and metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
  • Loading branch information
Dominik Rosiek authored and sumo-drosiek committed Jul 7, 2021
1 parent 8fd9452 commit 567e73a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/exporter/sumologicexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ exporters:
# default = 1_048_576 (1MB)
max_request_body_size: <max_request_body_size>

# format to use when sending logs to Sumo, default = json,
# format to use when sending logs to Sumo, default = otlp,
# NOTE: only `otlp` is supported when used with sumologicextension
log_format: {json, text, otlp}

# format to use when sending metrics to Sumo, default = prometheus,
# format to use when sending metrics to Sumo, default = otlp,
# NOTE: only `otlp` is supported when used with sumologicextension
metric_format: {carbon2, graphite, otlp, prometheus}

Expand Down
4 changes: 2 additions & 2 deletions pkg/exporter/sumologicexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ const (
// DefaultMaxRequestBodySize defines default MaxRequestBodySize in bytes
DefaultMaxRequestBodySize int = 1 * 1024 * 1024
// DefaultLogFormat defines default LogFormat
DefaultLogFormat LogFormatType = JSONFormat
DefaultLogFormat LogFormatType = OTLPLogFormat
// DefaultMetricFormat defines default MetricFormat
DefaultMetricFormat MetricFormatType = PrometheusFormat
DefaultMetricFormat MetricFormatType = OTLPMetricFormat
// DefaultSourceCategory defines default SourceCategory
DefaultSourceCategory string = ""
// DefaultSourceName defines default SourceName
Expand Down
4 changes: 2 additions & 2 deletions pkg/exporter/sumologicexporter/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func TestCreateDefaultConfig(t *testing.T) {
ExporterSettings: config.NewExporterSettings(config.NewID(typeStr)),
CompressEncoding: "gzip",
MaxRequestBodySize: 1_048_576,
LogFormat: "json",
MetricFormat: "prometheus",
LogFormat: "otlp",
MetricFormat: "otlp",
SourceCategory: "",
SourceName: "",
SourceHost: "",
Expand Down

0 comments on commit 567e73a

Please sign in to comment.