diff options
| author | 2025-06-30 15:19:09 +0200 | |
|---|---|---|
| committer | 2025-06-30 15:19:09 +0200 | |
| commit | 8b0ea560279a5bf4479555d3924c763ddeecfcad (patch) | |
| tree | 005e26d4a658e565594fb259cc17948659195822 /vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal | |
| parent | [chore] bumps ncruces/go-sqlite3 v0.26.1 => v0.26.3 (#4302) (diff) | |
| download | gotosocial-8b0ea560279a5bf4479555d3924c763ddeecfcad.tar.xz | |
[chore] update go dependencies (#4304)
- github.com/KimMachineGun/automemlimit v0.7.2 => v0.7.3
- github.com/gin-contrib/cors v1.7.5 => v1.7.6
- github.com/minio/minio-go/v7 v7.0.92 => v7.0.94
- github.com/spf13/cast v1.8.0 => v1.9.2
- github.com/uptrace/bun{,/*} v1.2.11 => v1.2.14
- golang.org/x/image v0.27.0 => v0.28.0
- golang.org/x/net v0.40.0 => v0.41.0
- code.superseriousbusiness.org/go-swagger v0.31.0-gts-go1.23-fix => v0.32.3-gts-go1.23-fix
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4304
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal')
| -rw-r--r-- | vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/README.md | 13 | ||||
| -rw-r--r-- | vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/x.go | 20 |
2 files changed, 12 insertions, 21 deletions
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/README.md b/vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/README.md index a2367651a..00170e1a6 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/README.md +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/README.md @@ -13,22 +13,13 @@ change in backwards incompatible ways as feedback is applied. ### Include Deprecated Metrics -Once new experimental runtime metrics are added, they will be produced -**in addition to** the existing runtime metrics. Users that migrate right away -can disable the old runtime metrics: - -```console -export OTEL_GO_X_DEPRECATED_RUNTIME_METRICS=false -``` - -In a later release, the deprecated runtime metrics will stop being produced by -default. To temporarily re-enable the deprecated metrics: +To temporarily re-enable the deprecated metrics: ```console export OTEL_GO_X_DEPRECATED_RUNTIME_METRICS=true ``` -After two additional releases, the deprecated runtime metrics will be removed, +Eventually, the deprecated runtime metrics will be removed, and setting the environment variable will no longer have any effect. The value set must be the case-insensitive string of `"true"` to enable the diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/x.go b/vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/x.go index 7ffb473ad..95a05d599 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/x.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/x.go @@ -9,17 +9,17 @@ package x // import "go.opentelemetry.io/contrib/instrumentation/runtime/interna import ( "os" - "strings" + "strconv" ) // DeprecatedRuntimeMetrics is an experimental feature flag that defines if the deprecated // runtime metrics should be produced. During development of the new // conventions, it is enabled by default. // -// To disable this feature set the OTEL_GO_X_DEPRECATED_RUNTIME_METRICS environment variable -// to the case-insensitive string value of "false" (i.e. "False" and "FALSE" +// To enable this feature set the OTEL_GO_X_DEPRECATED_RUNTIME_METRICS environment variable +// to the case-insensitive string value of "true" (i.e. "True" and "TRUE" // will also enable this). -var DeprecatedRuntimeMetrics = newFeature("DEPRECATED_RUNTIME_METRICS", true) +var DeprecatedRuntimeMetrics = newFeature("DEPRECATED_RUNTIME_METRICS", false) // BoolFeature is an experimental feature control flag. It provides a uniform way // to interact with these feature flags and parse their values. @@ -43,11 +43,11 @@ func (f BoolFeature) Key() string { return f.key } // Enabled returns if the feature is enabled. func (f BoolFeature) Enabled() bool { v := os.Getenv(f.key) - if strings.ToLower(v) == "false" { - return false - } - if strings.ToLower(v) == "true" { - return true + + val, err := strconv.ParseBool(v) + if err != nil { + return f.defaultVal } - return f.defaultVal + + return val } |
