1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-25 22:41:46 +02:00

Rename Self-Observability as just Observability (#7302)

Self-Observability is a redundant term, the self being instrumented is
always the self that observability is being provided for. Remove this
redundancy.

Continue to provide backwards compatibility for any users already using
`OTEL_GO_X_SELF_OBSERVABILITY` to enable the feature.

---------

Co-authored-by: Damien Mathieu <42@dmathieu.com>
This commit is contained in:
Tyler Yahn
2025-09-11 01:01:19 -07:00
committed by GitHub
parent b06d2739a7
commit 7fdebbe3ed
25 changed files with 219 additions and 182 deletions

View File

@@ -2246,7 +2246,7 @@ func TestAddLinkToNonRecordingSpan(t *testing.T) {
}
}
func TestSelfObservability(t *testing.T) {
func TestObservability(t *testing.T) {
testCases := []struct {
name string
test func(t *testing.T, scopeMetrics func() metricdata.ScopeMetrics)
@@ -2723,7 +2723,7 @@ func TestSelfObservability(t *testing.T) {
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
t.Setenv("OTEL_GO_X_SELF_OBSERVABILITY", "True")
t.Setenv("OTEL_GO_X_OBSERVABILITY", "True")
prev := otel.GetMeterProvider()
t.Cleanup(func() { otel.SetMeterProvider(prev) })
@@ -2749,8 +2749,8 @@ type ctxKeyT string
// ctxKey is a context key used to store and retrieve values in the context.
var ctxKey = ctxKeyT("testKey")
func TestSelfObservabilityContextPropagation(t *testing.T) {
t.Setenv("OTEL_GO_X_SELF_OBSERVABILITY", "True")
func TestObservabilityContextPropagation(t *testing.T) {
t.Setenv("OTEL_GO_X_OBSERVABILITY", "True")
prev := otel.GetMeterProvider()
t.Cleanup(func() { otel.SetMeterProvider(prev) })
@@ -2805,7 +2805,7 @@ func TestSelfObservabilityContextPropagation(t *testing.T) {
tp := NewTracerProvider()
wrap := func(parentCtx context.Context, name string, fn func(context.Context)) {
const tracer = "TestSelfObservabilityContextPropagation"
const tracer = "TestObservabilityContextPropagation"
ctx, s := tp.Tracer(tracer).Start(parentCtx, name)
defer s.End()
fn(ctx)
@@ -2903,9 +2903,9 @@ func BenchmarkTraceStart(b *testing.B) {
},
},
{
name: "SelfObservabilityEnabled",
name: "ObservabilityEnabled",
env: map[string]string{
"OTEL_GO_X_SELF_OBSERVABILITY": "True",
"OTEL_GO_X_OBSERVABILITY": "True",
},
},
} {