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

feat(otel): add support for span events #3776

Merged
merged 15 commits into from
Jul 18, 2024
Merged

Conversation

mabdinur
Copy link
Contributor

@mabdinur mabdinur commented Jul 10, 2024

What does this PR do?

  • Ensures span events generated via the OpenTelemetry SDK are copied from OpenTelemetry Spans to the underlying Datadog span. With change opentelemetry span events are no longer ignored. These events will be sent to the Datadog Agent.
  • Implements Span.record_exception. This ensures the status of the underlying Datadog span is updated when an exception is recorded on an OpenTelemetry Span.

Motivation:

The OpenTelemetry API supports setting Events on spans. Currently these events are ignored by the ddtrace library. To fully support the OpenTelemetry API the ddtrace library must support sending span events to the Datadog Agent.

Additional Notes:

How to test the change?

Unit tests + DataDog/system-tests#2735

Unsure? Have a question? Request a review!

@github-actions github-actions bot added otel OpenTelemetry-related changes tracing labels Jul 10, 2024
@mabdinur mabdinur force-pushed the munir/add-span-events branch from be2749a to 2e3e798 Compare July 10, 2024 20:30
spec/datadog/opentelemetry_spec.rb Outdated Show resolved Hide resolved
spec/datadog/opentelemetry_spec.rb Outdated Show resolved Hide resolved
@mabdinur mabdinur force-pushed the munir/add-span-events branch from 080e3b0 to 78f8b78 Compare July 10, 2024 20:36
@mabdinur mabdinur force-pushed the munir/add-span-events branch from 589abcf to 5beeb47 Compare July 10, 2024 20:38
@mabdinur mabdinur force-pushed the munir/add-span-events branch from 9230214 to 6d71a35 Compare July 11, 2024 20:26
@mabdinur mabdinur marked this pull request as ready for review July 11, 2024 20:26
@mabdinur mabdinur requested a review from a team as a code owner July 11, 2024 20:26
@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.91%. Comparing base (161e3eb) to head (da8c243).
Report is 11 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #3776    +/-   ##
========================================
  Coverage   97.91%   97.91%            
========================================
  Files        1246     1248     +2     
  Lines       74999    75154   +155     
  Branches     3627     3636     +9     
========================================
+ Hits        73435    73590   +155     
  Misses       1564     1564            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mabdinur mabdinur force-pushed the munir/add-span-events branch from e2b667a to f78f874 Compare July 12, 2024 20:00
@mabdinur mabdinur changed the title feat(otel): support span events feat(otel): support for span events Jul 16, 2024
@mabdinur mabdinur changed the title feat(otel): support for span events feat(otel): add support for span events Jul 16, 2024
@github-actions github-actions bot requested a review from a team as a code owner July 16, 2024 15:52
@mabdinur mabdinur force-pushed the munir/add-span-events branch from bb92318 to c1cd64f Compare July 16, 2024 16:45
lib/datadog/opentelemetry/sdk/trace/span.rb Outdated Show resolved Hide resolved
@pr-commenter
Copy link

pr-commenter bot commented Jul 17, 2024

Benchmarks

Benchmark execution time: 2024-07-18 17:53:28

Comparing candidate commit da8c243 in PR branch munir/add-span-events with baseline commit 161e3eb in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics.

lib/datadog/opentelemetry/sdk/trace/span.rb Outdated Show resolved Hide resolved
lib/datadog/opentelemetry/sdk/trace/span.rb Show resolved Hide resolved
lib/datadog/tracing/span.rb Show resolved Hide resolved
lib/datadog/tracing/span_event.rb Show resolved Hide resolved
lib/datadog/tracing/span_event.rb Show resolved Hide resolved
lib/datadog/tracing/span_event.rb Outdated Show resolved Hide resolved
lib/datadog/tracing/span_operation.rb Show resolved Hide resolved
lib/datadog/tracing/span_operation.rb Show resolved Hide resolved
lib/datadog/tracing/transport/serializable_trace.rb Outdated Show resolved Hide resolved
@mabdinur mabdinur force-pushed the munir/add-span-events branch from 7784672 to b6e3c5e Compare July 17, 2024 19:04
@mabdinur mabdinur force-pushed the munir/add-span-events branch from b6e3c5e to 54c757e Compare July 17, 2024 19:11
@mabdinur mabdinur force-pushed the munir/add-span-events branch 2 times, most recently from f01655f to c9d6455 Compare July 18, 2024 16:26
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Jul 18, 2024

Library Vulnerabilities

✅ No library vulnerabilities found (scanned da8c243).

Code Vulnerabilities

Warning badge  Notice badge  Info badge

Code Quality Violations

Notice badge  Info badge

@mabdinur mabdinur force-pushed the munir/add-span-events branch from c9d6455 to 64e29a1 Compare July 18, 2024 16:51
@datadog-datadog-staging-us1-all
Copy link

datadog-datadog-staging-us1-all bot commented Jul 18, 2024

Code Vulnerabilities

Warning badge  Notice badge  Info badge

Code Quality Violations

Notice badge  Info badge

@zarirhamza zarirhamza merged commit 2f089cd into master Jul 18, 2024
171 checks passed
@zarirhamza zarirhamza deleted the munir/add-span-events branch July 18, 2024 18:13
@github-actions github-actions bot added this to the 2.3.0 milestone Jul 18, 2024
@TonyCTHsu TonyCTHsu mentioned this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
otel OpenTelemetry-related changes tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants