mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-01-05 22:54:18 +02:00
Set telemetry.sdk.name resource attribute to "opentelemetry" (#1332)
* Set telemetry.sdk.name resource attribute to "opentelemetry" * Update config_test.go to correct `telemetry.sdk.name` Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
parent
380d9455fd
commit
3207770f88
@ -54,7 +54,7 @@ var (
|
||||
// Detect returns a *Resource that describes the OpenTelemetry SDK used.
|
||||
func (TelemetrySDK) Detect(context.Context) (*Resource, error) {
|
||||
return NewWithAttributes(
|
||||
semconv.TelemetrySDKNameKey.String("opentelemetry-go"),
|
||||
semconv.TelemetrySDKNameKey.String("opentelemetry"),
|
||||
semconv.TelemetrySDKLanguageKey.String("go"),
|
||||
semconv.TelemetrySDKVersionKey.String(otel.Version()),
|
||||
), nil
|
||||
|
@ -42,7 +42,7 @@ func TestDefaultConfig(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.EqualValues(t, map[string]string{
|
||||
"host.name": hostname(),
|
||||
"telemetry.sdk.name": "opentelemetry-go",
|
||||
"telemetry.sdk.name": "opentelemetry",
|
||||
"telemetry.sdk.language": "go",
|
||||
"telemetry.sdk.version": otel.Version(),
|
||||
}, toMap(res))
|
||||
@ -59,7 +59,7 @@ func TestDefaultConfigNoHost(t *testing.T) {
|
||||
res, err := resource.New(ctx, resource.WithHost(nil))
|
||||
require.NoError(t, err)
|
||||
require.EqualValues(t, map[string]string{
|
||||
"telemetry.sdk.name": "opentelemetry-go",
|
||||
"telemetry.sdk.name": "opentelemetry",
|
||||
"telemetry.sdk.language": "go",
|
||||
"telemetry.sdk.version": otel.Version(),
|
||||
}, toMap(res))
|
||||
@ -77,7 +77,7 @@ func TestDefaultConfigNoEnv(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.EqualValues(t, map[string]string{
|
||||
"host.name": hostname(),
|
||||
"telemetry.sdk.name": "opentelemetry-go",
|
||||
"telemetry.sdk.name": "opentelemetry",
|
||||
"telemetry.sdk.language": "go",
|
||||
"telemetry.sdk.version": otel.Version(),
|
||||
}, toMap(res))
|
||||
@ -97,7 +97,7 @@ func TestDefaultConfigWithEnv(t *testing.T) {
|
||||
"key": "value",
|
||||
"other": "attr",
|
||||
"host.name": hostname(),
|
||||
"telemetry.sdk.name": "opentelemetry-go",
|
||||
"telemetry.sdk.name": "opentelemetry",
|
||||
"telemetry.sdk.language": "go",
|
||||
"telemetry.sdk.version": otel.Version(),
|
||||
}, toMap(res))
|
||||
|
Loading…
Reference in New Issue
Block a user