Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Joan López de la Franca Beltran <[email protected]>
  • Loading branch information
olegbespalov and joanlopez authored May 24, 2024
1 parent d4fff88 commit abd91b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pkg/opentelemetry/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ type Config struct {
FlushInterval time.Duration

// ExporterType sets the type of OpenTelemetry Exporter to use
// Currently only "grpc" is supported
ExporterType string
// ExportInterval configures the intervening time between metrics exports
ExportInterval time.Duration
Expand Down Expand Up @@ -144,7 +143,7 @@ func (c Config) Validate() error {

if c.ExporterType != grpcExporterType && c.ExporterType != httpExporterType {
return fmt.Errorf(
"unsupported exporter type %q, currently only %q and %q supported",
"unsupported exporter type %q, currently only %q and %q are supported",
c.ExporterType,
grpcExporterType,
httpExporterType,
Expand Down
2 changes: 1 addition & 1 deletion pkg/opentelemetry/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func TestConfig(t *testing.T) {

"unsupported receiver type": {
env: map[string]string{"K6_OTEL_GRPC_EXPORTER_ENDPOINT": "else", "K6_OTEL_EXPORT_INTERVAL": "4m", "K6_OTEL_EXPORTER_TYPE": "socket"},
err: `error validating OpenTelemetry output config: unsupported exporter type "socket", currently only "grpc" and "http" supported`,
err: `error validating OpenTelemetry output config: unsupported exporter type "socket", currently only "grpc" and "http" are supported`,
},
}

Expand Down

0 comments on commit abd91b2

Please sign in to comment.