Skip to content

Commit 8a161fa

Browse files
authored
Support profiling containerized applications (#280)
1 parent 6ddde25 commit 8a161fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

instana/autoprofile/sampler_scheduler.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,12 @@ def report(self):
149149
profile = self.sampler.build_profile(
150150
to_millis(self.profile_duration),
151151
to_millis(time.time() - self.profile_start_ts))
152-
profile_dict = profile.to_dict()
153152

154153
if self.profiler.agent.can_send():
155-
self.profiler.agent.collector.profile_queue.put(profile_dict)
154+
if self.profiler.agent.announce_data.pid:
155+
profile.process_id = str(self.profiler.agent.announce_data.pid)
156+
157+
self.profiler.agent.collector.profile_queue.put(profile.to_dict())
156158

157159
logger.debug(self.config.log_prefix + ': reporting profile:')
158160
else:

0 commit comments

Comments
 (0)