You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
768e930779
a part of #7020 ```txt goos: windows goarch: amd64 pkg: go.opentelemetry.io/otel/exporters/stdout/stdoutlog/internal/observ cpu: Intel(R) Core(TM) i7-14700 │ result.txt │ │ sec/op │ InstrumentationExportLogs/NoError-28 47.68n ± 5% InstrumentationExportLogs/PartialError-28 471.6n ± 2% InstrumentationExportLogs/FullError-28 471.9n ± 10% geomean 219.7n │ result.txt │ │ B/op │ InstrumentationExportLogs/NoError-28 0.000 ± 0% InstrumentationExportLogs/PartialError-28 305.0 ± 0% InstrumentationExportLogs/FullError-28 305.0 ± 0% geomean ¹ ¹ summaries must be >0 to compute geomean │ result.txt │ │ allocs/op │ InstrumentationExportLogs/NoError-28 0.000 ± 0% InstrumentationExportLogs/PartialError-28 4.000 ± 0% InstrumentationExportLogs/FullError-28 4.000 ± 0% geomean ¹ ¹ summaries must be >0 to compute geomean ``` --------- Co-authored-by: Damien Mathieu <42@dmathieu.com>
24 lines
761 B
Go
24 lines
761 B
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Package x documents experimental features for [go.opentelemetry.io/otel/exporters/stdout/stdoutlog].
|
|
package x // import "go.opentelemetry.io/otel/exporters/stdout/stdoutlog/internal/x"
|
|
|
|
import "strings"
|
|
|
|
// Observability is an experimental feature flag that determines if exporter
|
|
// observability metrics are enabled.
|
|
//
|
|
// To enable this feature set the OTEL_GO_X_OBSERVABILITY environment variable
|
|
// to the case-insensitive string value of "true" (i.e. "True" and "TRUE"
|
|
// will also enable this).
|
|
var Observability = newFeature(
|
|
[]string{"OBSERVABILITY"},
|
|
func(v string) (string, bool) {
|
|
if strings.EqualFold(v, "true") {
|
|
return v, true
|
|
}
|
|
return "", false
|
|
},
|
|
)
|