Skip to content

Commit c8fad6a

Browse files
authored
Merge pull request #52 from scribd/laynax/SERF-1826/profiler-service-name
[SERF-1826] Add service name to profiler
2 parents 6e8c958 + 2e6f275 commit c8fad6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/instrumentation/profiler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ func (p *Profiler) Stop() {
3131
// NewProfiler constructs new profiler with options.
3232
// You can include common options like: profiler.WithService(appName), profiler.WithVersion(version).
3333
func NewProfiler(config *Config, options ...profiler.Option) *Profiler {
34+
serviceName := globalServiceName(config.ServiceName)
35+
3436
options = append(
3537
options,
38+
profiler.WithService(serviceName),
3639
profiler.WithEnv(config.environment),
3740
profiler.WithVersion(config.ServiceVersion),
3841
)

0 commit comments

Comments
 (0)