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

update: use context instead of trace_id, span_id, trace_flags at eventsAPI #4344

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Faakhir30
Copy link

@Faakhir30 Faakhir30 commented Dec 10, 2024

Description

Updated Event API so it accepts SpanContext as a param instead of specific trace_id, span_id, trace_flags. This is helpful cause stuff like baggage requires a context param. Did update tests also where required.

Fixes #4328

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • tox -e opentelemetry-api
  • tox -e opentelemetry-sdk
  • tox -e ruff

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR: (Will continue working on this once status of EventAPI is confirmed as future plan is to drop the specific Event API.
  • [] No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been updated
  • Documentation has been updated

@Faakhir30 Faakhir30 requested a review from a team as a code owner December 10, 2024 12:22
Copy link

linux-foundation-easycla bot commented Dec 10, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

@xrmx
Copy link
Contributor

xrmx commented Dec 10, 2024

Thanks for the PR. It looks like the plan is to drop the specific Event API in favor of just using the Logs one so I am not sure we want to create another versions of the former.

@Faakhir30
Copy link
Author

Thanks for the PR. It looks like the plan is to drop the specific Event API in favor of just using the Logs one so I am not sure we want to create another versions of the former.

Understood, if we don't want this, feel free to close this PR.
Also in that case I think this issue would translate to the following IMO: LogRecord should accept Context instead of specific trace_id, span_id, trace_flags, since LogRecord is also getting trace_id etc as param instead of Context

@aabmass
Copy link
Member

aabmass commented Dec 10, 2024

@Faakhir30 I think that's right, we should fix this in the logging API in lieu of this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Event API should accept Context instead of specific trace_id, span_id, trace_flags
3 participants