From 1649e576794de8afe4ea52cb5faf9911a362be68 Mon Sep 17 00:00:00 2001 From: s4s7 Date: Tue, 26 Mar 2024 20:00:53 +0900 Subject: [PATCH] typo: defualtServiceName() to defaultServiceName() --- instrumentation.go | 4 ++-- instrumentation_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instrumentation.go b/instrumentation.go index 3557fd8cb..ef1db40ed 100644 --- a/instrumentation.go +++ b/instrumentation.go @@ -186,7 +186,7 @@ func newInstConfig(ctx context.Context, opts []InstrumentationOption) (instConfi // Defaults. if c.serviceName == "" { - c.serviceName = c.defualtServiceName() + c.serviceName = c.defaultServiceName() } if c.traceExp == nil { var e error @@ -202,7 +202,7 @@ func newInstConfig(ctx context.Context, opts []InstrumentationOption) (instConfi return c, err } -func (c instConfig) defualtServiceName() string { +func (c instConfig) defaultServiceName() string { name := "unknown_service" if c.target.ExePath != "" { name = fmt.Sprintf("%s:%s", name, filepath.Base(c.target.ExePath)) diff --git a/instrumentation_test.go b/instrumentation_test.go index a9073ac2e..d638af53b 100644 --- a/instrumentation_test.go +++ b/instrumentation_test.go @@ -38,7 +38,7 @@ func TestWithServiceName(t *testing.T) { // No service name provided - check for default value c, err = newInstConfig(ctx, []InstrumentationOption{}) require.NoError(t, err) - assert.Equal(t, c.defualtServiceName(), c.serviceName) + assert.Equal(t, c.defaultServiceName(), c.serviceName) } func TestWithPID(t *testing.T) {