Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override OTEL tracer Start() method to include metadata #1146

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

ka3de
Copy link
Collaborator

@ka3de ka3de commented Dec 21, 2023

What?

Modifies our tracer implementation to override and wrap the underlying OTEL tracer's Start() method so the extra traces metadata set by the K6_BROWSER_TRACES_METADATA environment variable are also including when using the OTEL tracer's Start() method directly.

Why?

Fixes an issue for which the extra metadata set through K6_BROWSER_TRACES_METADATA was not included in the iteration root span.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes (As mentioned in Add support for traces metadata #1104 unfortunately we can not extract attributes from a TracerOption)
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

#1104

@ka3de ka3de self-assigned this Dec 21, 2023
@ka3de ka3de added the bug Something isn't working label Dec 21, 2023
@ka3de ka3de marked this pull request as ready for review December 21, 2023 16:34
@ka3de ka3de requested review from inancgumus and ankur22 December 21, 2023 16:34
@ka3de ka3de requested review from inancgumus and ankur22 and removed request for inancgumus and ankur22 January 8, 2024 08:14
Modifies our tracer implementation to override the underlying OTEL's
tracer Start() method so the extra traces metadata set by the
K6_BROWSER_TRACES_METADATA environment variable is also including when
using the Start() method directly. Currently the Start() method is only
used when creating the root span for each iteration.
@ka3de ka3de force-pushed the fix/traces-metadata-rootspan branch from 42258cb to 72beeed Compare January 8, 2024 10:56
@ka3de ka3de merged commit a144bfd into main Jan 9, 2024
17 checks passed
@ka3de ka3de deleted the fix/traces-metadata-rootspan branch January 9, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants