DataDog / dd-trace-php

Datadog PHP Clients
https://docs.datadoghq.com/tracing/setup/php
Other
487 stars 152 forks source link

fix(otel): Missing `addLink` method and Fiber handling #2849

Closed PROFeNoM closed 2 weeks ago

PROFeNoM commented 2 weeks ago

Description

Reviewer checklist

codecov-commenter commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 57.14286% with 21 lines in your changes missing coverage. Please review.

Project coverage is 80.94%. Comparing base (31382ec) to head (e44f4e4).

Files with missing lines Patch % Lines
src/DDTrace/OpenTelemetry/Span.php 59.09% 18 Missing :warning:
src/DDTrace/OpenTelemetry/Context.php 40.00% 3 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2849/graphs/tree.svg?width=650&height=150&src=pr&token=eXio8H7vwF&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog)](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2849?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) ```diff @@ Coverage Diff @@ ## master #2849 +/- ## ============================================ - Coverage 81.05% 80.94% -0.11% - Complexity 2517 2526 +9 ============================================ Files 146 146 Lines 14654 14680 +26 ============================================ + Hits 11878 11883 +5 - Misses 2776 2797 +21 ``` | [Flag](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2849/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [tracer-extension](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2849/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `78.18% <ø> (ø)` | | | [tracer-php](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2849/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `82.10% <57.14%> (-0.16%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2849?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [src/DDTrace/OpenTelemetry/Context.php](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2849?src=pr&el=tree&filepath=src%2FDDTrace%2FOpenTelemetry%2FContext.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-c3JjL0REVHJhY2UvT3BlblRlbGVtZXRyeS9Db250ZXh0LnBocA==) | `82.81% <40.00%> (-3.48%)` | :arrow_down: | | [src/DDTrace/OpenTelemetry/Span.php](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2849?src=pr&el=tree&filepath=src%2FDDTrace%2FOpenTelemetry%2FSpan.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-c3JjL0REVHJhY2UvT3BlblRlbGVtZXRyeS9TcGFuLnBocA==) | `85.42% <59.09%> (-6.58%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2849/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2849?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2849?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). Last update [31382ec...e44f4e4](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2849?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog).
pr-commenter[bot] commented 2 weeks ago

Benchmarks

Benchmark execution time: 2024-09-16 08:08:18

Comparing candidate commit e4b186a5ae9a1705aeee5209318aa7293b56a948 in PR branch alex/fix/otel-addlink-fiber with baseline commit 1a7182ce5f844d39cd203191bc2d0d5e07870405 in branch master.

Found 3 performance improvements and 5 performance regressions! Performance is the same for 170 metrics, 0 unstable metrics.

scenario:LaravelBench/benchLaravelBaseline-opcache

scenario:PDOBench/benchPDOBaseline

scenario:PDOBench/benchPDOOverheadWithDBM

scenario:SamplingRuleMatchingBench/benchRegexMatching2

scenario:SamplingRuleMatchingBench/benchRegexMatching3

scenario:SamplingRuleMatchingBench/benchRegexMatching4-opcache

scenario:TraceSerializationBench/benchSerializeTrace

scenario:WordPressBench/benchWordPressOverhead

PROFeNoM commented 2 weeks ago

I'm putting it back to draft. +7-9% performance regression for a simple check is simply too much. I'll try and optimize that a little bit.

bwoebi commented 2 weeks ago

@PROFeNoM Feels like the benchmarks are simply flaky. ... But I suppose for that one the micro-optimization is worth it.

pr-commenter[bot] commented 2 weeks ago

Benchmarks [ tracer ]

Benchmark execution time: 2024-09-16 13:24:15

Comparing candidate commit e44f4e456c07253aff91cad77cbc68921fadb820 in PR branch alex/fix/otel-addlink-fiber with baseline commit 31382ec7e2f822cf156883b11e249f4bfd4db72e in branch master.

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

scenario:ContextPropagationBench/benchInject64Bit

scenario:ContextPropagationBench/benchInject64Bit-opcache

scenario:LogsInjectionBench/benchLogsInfoInjection-opcache

scenario:PDOBench/benchPDOBaseline-opcache

scenario:PDOBench/benchPDOOverhead-opcache

scenario:WordPressBench/benchWordPressOverhead