Skip to content

Commit

Permalink
use service id in profile file name (micro#925)
Browse files Browse the repository at this point in the history
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
  • Loading branch information
vtolstov authored and asim committed Nov 8, 2019
1 parent 6f28852 commit 8227206
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion service.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ func (s *service) Run() error {
if prof := os.Getenv("MICRO_DEBUG_PROFILE"); len(prof) > 0 {
service := s.opts.Server.Options().Name
version := s.opts.Server.Options().Version
id := s.opts.Server.Options().Id
profiler := pprof.NewProfile(
profile.Name(service + "." + version),
profile.Name(service + "." + version + "." + id),
)
if err := profiler.Start(); err != nil {
return err
Expand Down

0 comments on commit 8227206

Please sign in to comment.