Skip to content

Commit

Permalink
Set default export interval as 10s
Browse files Browse the repository at this point in the history
  • Loading branch information
olegbespalov committed Jun 19, 2024
1 parent b297321 commit 4499201
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ It's worth to mention that the extension is using the [OpenTelemetry Go SDK](htt

### OpenTelemetry-specific configuration

* `K6_OTEL_EXPORT_INTERVAL` - configures the intervening time between metrics exports. Default is `1s`.
* `K6_OTEL_EXPORT_INTERVAL` - configures the intervening time between metrics exports. Default is `10s`.
* `K6_OTEL_EXPORTER_TYPE` - metric exporter type. Default is `grpc`.

#### GRPC exporter
Expand Down
2 changes: 1 addition & 1 deletion pkg/opentelemetry/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func newDefaultConfig() Config {
GRPCExporterInsecure: null.BoolFrom(false),
GRPCExporterEndpoint: null.StringFrom("localhost:4317"),

ExportInterval: types.NullDurationFrom(1 * time.Second),
ExportInterval: types.NullDurationFrom(10 * time.Second),
FlushInterval: types.NullDurationFrom(1 * time.Second),
}
}
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 @@ -31,7 +31,7 @@ func TestConfig(t *testing.T) {
HTTPExporterURLPath: null.StringFrom("/v1/metrics"),
GRPCExporterInsecure: null.NewBool(false, true),
GRPCExporterEndpoint: null.StringFrom("localhost:4317"),
ExportInterval: types.NullDurationFrom(1 * time.Second),
ExportInterval: types.NullDurationFrom(10 * time.Second),
FlushInterval: types.NullDurationFrom(1 * time.Second),
},
},
Expand Down

0 comments on commit 4499201

Please sign in to comment.