Skip to content

Commit

Permalink
typo: defualtServiceName() to defaultServiceName() (#736)
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Yahn <[email protected]>
  • Loading branch information
s4s7 and MrAlias authored Apr 9, 2024
1 parent a32172e commit 764c855
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions instrumentation.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,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
Expand All @@ -201,7 +201,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))
Expand Down
2 changes: 1 addition & 1 deletion instrumentation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 764c855

Please sign in to comment.