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

Add OTel Integration tracking #3084

Merged
merged 3 commits into from
Feb 21, 2025
Merged

Add OTel Integration tracking #3084

merged 3 commits into from
Feb 21, 2025

Conversation

bwoebi
Copy link
Collaborator

@bwoebi bwoebi commented Feb 13, 2025

  • Fires app-integration-changed events whenever a CachedInstrumentation object is constructed. (this generally happens once in constructors of well-behaving OTel integrations.
  • Adds a component tag to spans created from a tracer created by the CachedInstrumentation object.

@bwoebi bwoebi requested review from a team as code owners February 13, 2025 20:25
@bwoebi bwoebi force-pushed the bob/otel-integration-track branch from 347b58d to 8d10145 Compare February 13, 2025 20:26
@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 60.86957% with 9 lines in your changes missing coverage. Please review.

Project coverage is 73.02%. Comparing base (368a541) to head (b179d88).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...rc/DDTrace/OpenTelemetry/CachedInstrumentation.php 63.63% 8 Missing ⚠️
src/bridge/_files_opentelemetry.php 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (60.86%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3084      +/-   ##
============================================
- Coverage     73.04%   73.02%   -0.02%     
  Complexity     2792     2792              
============================================
  Files           139      140       +1     
  Lines         15284    15307      +23     
  Branches       1047     1047              
============================================
+ Hits          11164    11178      +14     
- Misses         3567     3576       +9     
  Partials        553      553              
Flag Coverage Δ
appsec-extension 68.28% <ø> (ø)
tracer-php 74.83% <60.86%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/bridge/_files_opentelemetry.php 0.00% <0.00%> (ø)
...rc/DDTrace/OpenTelemetry/CachedInstrumentation.php 63.63% <63.63%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 368a541...b179d88. Read the comment docs.

@pr-commenter
Copy link

pr-commenter bot commented Feb 13, 2025

Benchmarks [ tracer ]

Benchmark execution time: 2025-02-20 23:35:54

Comparing candidate commit b179d88 in PR branch bob/otel-integration-track with baseline commit 368a541 in branch master.

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

scenario:LogsInjectionBench/benchLogsInfoInjection-opcache

  • 🟩 execution_time [-520.782ns; -224.418ns] or [-5.294%; -2.281%]

scenario:PDOBench/benchPDOBaseline

  • 🟥 execution_time [+16.605µs; +17.703µs] or [+9.138%; +9.743%]

scenario:PDOBench/benchPDOBaseline-opcache

  • 🟩 execution_time [-17.687µs; -12.216µs] or [-8.878%; -6.132%]

@bwoebi bwoebi requested review from a team as code owners February 14, 2025 10:54
@bwoebi bwoebi force-pushed the bob/flaky branch 12 times, most recently from ae5c5bb to e14ac37 Compare February 19, 2025 18:24
@bwoebi bwoebi force-pushed the bob/otel-integration-track branch from 8d10145 to 2f499ed Compare February 19, 2025 18:30
@bwoebi bwoebi force-pushed the bob/flaky branch 2 times, most recently from cb41689 to fbd4882 Compare February 20, 2025 13:46
Base automatically changed from bob/flaky to master February 20, 2025 13:47
@bwoebi bwoebi force-pushed the bob/otel-integration-track branch from 2f499ed to 09c2779 Compare February 20, 2025 13:58
@bwoebi bwoebi force-pushed the bob/otel-integration-track branch from 09c2779 to 468ee74 Compare February 20, 2025 17:34
@bwoebi bwoebi mentioned this pull request Feb 20, 2025
Copy link
Contributor

@PROFeNoM PROFeNoM left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Added one comment, but it's more a nit than anything else; doesn't really matter.

public function spanBuilder(string $spanName): \OpenTelemetry\API\Trace\SpanBuilderInterface
{
$spanBuilder = $this->tracer->spanBuilder($spanName);
//print new \Exception;
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps this should be removed?

@PROFeNoM PROFeNoM merged commit 539a118 into master Feb 21, 2025
793 of 806 checks passed
@PROFeNoM PROFeNoM deleted the bob/otel-integration-track branch February 21, 2025 07:56
@github-actions github-actions bot added this to the 1.7.0 milestone Feb 21, 2025
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.

3 participants