Skip to content

Commit

Permalink
get and pass traceparent to osbs tasks
Browse files Browse the repository at this point in the history
This is to enable OpenTelemetry tracing in
`osbs`

Signed-off-by: Harsh Modi <hmodi@redhat.com>
  • Loading branch information
hjmodi committed Sep 7, 2023
1 parent 30499d1 commit 0f64a46
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions koji_containerbuild/plugins/builder_containerbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,13 @@ def handler(self, src, target, opts=None):
userdata=opts.get('userdata', None),
)

# need brew instrumentation to be completed to know where we will get this from
traceparent = ''
if traceparent:
if not kwargs['userdata']:
kwargs['userdata'] = {}
kwargs['userdata'] = traceparent

result = self.createContainer(**kwargs)

self.logger.debug("Result: %r", result)
Expand Down Expand Up @@ -1190,6 +1197,13 @@ def handler(self, target, opts=None):
userdata=opts.get('userdata', None),
)

# need brew instrumentation to be completed to know where we will get this from
traceparent = ''
if traceparent:
if not kwargs['userdata']:
kwargs['userdata'] = {}
kwargs['userdata'] = traceparent

result = self.createSourceContainer(**kwargs)

self.logger.debug("Result: %r", result)
Expand Down

0 comments on commit 0f64a46

Please sign in to comment.