use service id in profile file name (#925)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
6f28852e1b
commit
8227206208
@ -154,8 +154,9 @@ func (s *service) Run() error {
|
|||||||
if prof := os.Getenv("MICRO_DEBUG_PROFILE"); len(prof) > 0 {
|
if prof := os.Getenv("MICRO_DEBUG_PROFILE"); len(prof) > 0 {
|
||||||
service := s.opts.Server.Options().Name
|
service := s.opts.Server.Options().Name
|
||||||
version := s.opts.Server.Options().Version
|
version := s.opts.Server.Options().Version
|
||||||
|
id := s.opts.Server.Options().Id
|
||||||
profiler := pprof.NewProfile(
|
profiler := pprof.NewProfile(
|
||||||
profile.Name(service + "." + version),
|
profile.Name(service + "." + version + "." + id),
|
||||||
)
|
)
|
||||||
if err := profiler.Start(); err != nil {
|
if err := profiler.Start(); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user