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

chore(tracing): drops support for v0.3 traces endpoint #10263

Merged
merged 25 commits into from
Sep 23, 2024

Conversation

mabdinur
Copy link
Contributor

@mabdinur mabdinur commented Aug 16, 2024

Description

Currently the python tracer can submit traces to the v0.3/traces and v0.4/tracer endpoints in the Datadog Agent. The only difference between these endpoints is that v0.4/traces returns the agent sample rates (this is "priority sampling") while the response from v0.3/traces endpoint does not contain any sampling rates/configurations.

With the removal of the dd_priority_sampling configuration in a previous PR user's can no longer disable agent based sampling in tracing clients. With this change we should deprecate the v0.3/traces endpoint and ensure it is never used. Instead the v0.4 or v0.5 endpoints should be used to submit traces to the agent.

Follow up to: #10102

Changes

  • Removes v0.3/traces endpoint from the tracer AgentWriter. This endpoint is deprecated and will removed from the Agent soon******.
  • Removes all tests that submit traces to the v0.3/traces agent endpoint
  • Renames v0.3 encoder to v0.4 encoder (v0.3/traces and v0.4/traces agent endpoints have the same encoding format)

Note: The minimum supported version of the datadog agent for ddtrace>=2.0 is v7.28.0. This version of the datadog supports v0.4 and v0.5 trace endpoints. This is not a breaking change.

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

Copy link
Contributor

github-actions bot commented Aug 16, 2024

CODEOWNERS have been resolved as:

releasenotes/notes/remove-v03-encoder-1f36d48dc297c6fa.yaml             @DataDog/apm-python
ddtrace/_trace/span.py                                                  @DataDog/apm-sdk-api-python
ddtrace/internal/_encoding.pyi                                          @DataDog/apm-core-python
ddtrace/internal/_encoding.pyx                                          @DataDog/apm-core-python
ddtrace/internal/encoding.py                                            @DataDog/apm-core-python
ddtrace/internal/writer/writer.py                                       @DataDog/apm-core-python
ddtrace/internal/writer/writer_client.py                                @DataDog/apm-core-python
ddtrace/settings/config.py                                              @DataDog/python-guild @DataDog/apm-sdk-api-python
docs/configuration.rst                                                  @DataDog/python-guild
scripts/profiles/encoders/run.sh                                        @DataDog/apm-core-python
tests/integration/test_integration.py                                   @DataDog/apm-core-python
tests/integration/test_priority_sampling.py                             @DataDog/apm-sdk-api-python
tests/tracer/test_encoders.py                                           @DataDog/apm-sdk-api-python
tests/tracer/test_tracer.py                                             @DataDog/apm-sdk-api-python
tests/tracer/test_writer.py                                             @DataDog/apm-sdk-api-python
tests/utils.py                                                          @DataDog/python-guild

@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Aug 16, 2024

Datadog Report

Branch report: munir/remove-v03-encoder
Commit report: 6ff888f
Test service: dd-trace-py

✅ 0 Failed, 592 Passed, 694 Skipped, 19m 15.34s Total duration (17m 47.68s time saved)

@pr-commenter
Copy link

pr-commenter bot commented Aug 16, 2024

Benchmarks

Benchmark execution time: 2024-09-23 16:53:20

Comparing candidate commit 6ff888f in PR branch munir/remove-v03-encoder with baseline commit 5546c23 in branch main.

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

scenario:iast_aspects-aspect_iast_do_re_sub

  • 🟩 max_rss_usage [-2.698MB; -2.354MB] or [-9.075%; -7.918%]

tests/tracer/test_writer.py Outdated Show resolved Hide resolved
tests/tracer/test_writer.py Outdated Show resolved Hide resolved
@mabdinur mabdinur marked this pull request as ready for review September 12, 2024 13:55
@mabdinur mabdinur requested review from a team as code owners September 12, 2024 13:55
@mabdinur mabdinur enabled auto-merge (squash) September 13, 2024 04:42
@mabdinur mabdinur merged commit 37e075f into main Sep 23, 2024
574 of 575 checks passed
@mabdinur mabdinur deleted the munir/remove-v03-encoder branch September 23, 2024 20:12
mabdinur added a commit that referenced this pull request Sep 25, 2024
## Description

Currently the python tracer can submit traces to the `v0.3/traces` and
`v0.4/tracer` endpoints in the Datadog Agent. The only difference
between these endpoints is that `v0.4/traces` returns the agent sample
rates (this is "priority sampling") while the response from
`v0.3/traces` endpoint does not contain any sampling
rates/configurations.

With the removal of the dd_priority_sampling configuration in a previous
PR user's can no longer disable agent based sampling in tracing clients.
With this change we should deprecate the `v0.3/traces` endpoint and
ensure it is never used. Instead the `v0.4` or `v0.5` endpoints should
be used to submit traces to the agent.

Follow up to: #10102

## Changes 
- Removes `v0.3/traces` endpoint from the tracer AgentWriter. This
endpoint is deprecated and will removed from the Agent soon******.
- Removes all tests that submit traces to the `v0.3/traces` agent
endpoint
- Renames `v0.3` encoder to `v0.4` encoder (`v0.3/traces` and
`v0.4/traces` agent endpoints have the same encoding format)


Note: The minimum supported version of the datadog agent for
ddtrace>=2.0 is
[v7.28.0](https://ddtrace.readthedocs.io/en/stable/versioning.html?highlight=supported#release-support).
This version of the datadog supports v0.4 and v0.5 trace endpoints. This
is not a breaking change.

## Checklist
- [ ] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [ ] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
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.

4 participants