DataDog / dd-trace-php

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

Collect agent info and apply the env for remote config #2930

Closed bwoebi closed 1 week ago

bwoebi commented 2 weeks ago

It basically sets the datadog.env INI at runtime (at a couple important locations - at start and once when actually sampling).

This ensures agent sampling is correct, and RC targets the right env.

codecov-commenter commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 72.16%. Comparing base (e2b0a15) to head (074196b). Report is 5 commits behind head on master.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2930/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/2930?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) ```diff @@ Coverage Diff @@ ## master #2930 +/- ## ============================================ - Coverage 73.62% 72.16% -1.46% Complexity 2529 2529 ============================================ Files 109 136 +27 Lines 10410 14452 +4042 Branches 0 991 +991 ============================================ + Hits 7664 10429 +2765 - Misses 2746 3477 +731 - Partials 0 546 +546 ``` | [Flag](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2930/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [appsec-extension](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2930/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `68.40% <ø> (?)` | | | [tracer-php](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2930/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `73.62% <ø> (ø)` | | 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. [see 27 files with indirect coverage changes](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2930/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/2930?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/2930?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). Last update [e2b0a15...074196b](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2930?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 1 week ago

Benchmarks [ tracer ]

Benchmark execution time: 2024-11-14 22:42:41

Comparing candidate commit 074196bd338e8ec31ff1089f4f878f55ce3ded11 in PR branch agent-info with baseline commit e2b0a15abbf03bc042f4fdd732e36fde8cdf0fd3 in branch master.

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

scenario:EmptyFileBench/benchEmptyFileOverhead

scenario:SamplingRuleMatchingBench/benchGlobMatching2

scenario:TraceFlushBench/benchFlushTrace