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

parametric: remove http_headers from otel start span creation #3478

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mabdinur
Copy link
Contributor

Motivation

  • Removes http_headers parameter from the /trace/otel/start_span endpoint. The OpenTelemetry Start Span API does not support initializing spans from http headers.

Changes

  • Removes http_headers from APMLibraryClient.otel_trace_start_span
  • Removes http_headers from utils.parametric._library.Link. Creating otel spanlinks from http_headers is also not supported by the OpenTelemetry Start Span API.
  • Updates tests that rely on generating Spans and SpanLinks from http_headers
  • Removes tests that primary tests that Spans/SpanLinks can be generated from http_headers.
  • Drops support for the http_headers start_span argument all parameters parametric apps.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner. We're working on refining the codeowners file quickly.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • CI is green, or failing jobs are not related to this change (and you are 100% sure about this statement)
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added (or removed)?

@mabdinur mabdinur changed the title parametric: remove http_headers arg from otel start span parametric: remove http_headers from otel start span Nov 18, 2024
@mabdinur mabdinur force-pushed the munir/remove-htpp-args-parame branch from ced27a6 to 0e6738c Compare November 18, 2024 20:02
@mabdinur mabdinur force-pushed the munir/remove-htpp-args-parame branch from 0e6738c to 1bdbd9b Compare November 19, 2024 00:05
@mabdinur mabdinur marked this pull request as ready for review November 19, 2024 00:05
@mabdinur mabdinur requested review from a team as code owners November 19, 2024 00:05
@mabdinur mabdinur requested review from dmehala, emmettbutler and romainkomorndatadog and removed request for a team November 19, 2024 00:05
@mabdinur mabdinur changed the title parametric: remove http_headers from otel start span parametric: remove http_headers from otel start span creation Nov 19, 2024
Copy link
Collaborator

@robertomonteromiguel robertomonteromiguel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes requested. Anyway, this PR requires the review of other codeowners.

with test_library.otel_start_span("otel.span") as otel_span:
current_span = test_library.current_span()
with test_library.start_span("dd_root") as dd_span:
pass
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this code useful?

@@ -43,20 +43,3 @@ def test_otel_start_span_with_w3c(self, test_agent, test_library):
assert root_span["resource"] == "operation"
assert root_span["meta"]["start_attr_key"] == "start_attr_val"
assert root_span["duration"] == duration_ns

@irrelevant(context.library == "cpp", reason="library does not implement OpenTelemetry")
def test_otel_span_with_w3c_headers(self, test_agent, test_library):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you review the manifest files? For example there is an entry for "Test_Otel_Span_With_W3c" in python.yml

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.

2 participants