| 1 |
# Feature Gates |
| 2 |
|
| 3 |
The runtime package contains a feature gate used to ease the migration |
| 4 |
from the [previous runtime metrics conventions] to the new [OpenTelemetry Go |
| 5 |
Runtime conventions]. |
| 6 |
|
| 7 |
Note that the new runtime metrics conventions are still experimental, and may |
| 8 |
change in backwards incompatible ways as feedback is applied. |
| 9 |
|
| 10 |
## Features |
| 11 |
|
| 12 |
- [Include Deprecated Metrics](#include-deprecated-metrics) |
| 13 |
|
| 14 |
### Include Deprecated Metrics |
| 15 |
|
| 16 |
To temporarily re-enable the deprecated metrics: |
| 17 |
|
| 18 |
```console |
| 19 |
export OTEL_GO_X_DEPRECATED_RUNTIME_METRICS=true |
| 20 |
``` |
| 21 |
|
| 22 |
Eventually, the deprecated runtime metrics will be removed, |
| 23 |
and setting the environment variable will no longer have any effect. |
| 24 |
|
| 25 |
The value set must be the case-insensitive string of `"true"` to enable the |
| 26 |
feature, and `"false"` to disable the feature. All other values are ignored. |
| 27 |
|
| 28 |
[previous runtime metrics conventions]: https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/[email protected] |
| 29 |
[OpenTelemetry Go Runtime conventions]: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/runtime/go-metrics.md |