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(telemetry): improves typing for telemetry metric namespaces #11564

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

mabdinur
Copy link
Contributor

@mabdinur mabdinur commented Nov 27, 2024

Follow up to: #11565

Prevents telemetry metrics from being queued with an invalid namespace

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

@mabdinur mabdinur requested a review from a team as a code owner November 27, 2024 16:57
@mabdinur mabdinur requested review from a team as code owners November 27, 2024 16:58
Copy link
Contributor

github-actions bot commented Nov 27, 2024

CODEOWNERS have been resolved as:

ddtrace/_monkey.py                                                      @DataDog/apm-core-python
ddtrace/_trace/processor/__init__.py                                    @DataDog/apm-sdk-api-python
ddtrace/_trace/telemetry.py                                             @DataDog/apm-sdk-api-python
ddtrace/appsec/_iast/_metrics.py                                        @DataDog/asm-python
ddtrace/appsec/_metrics.py                                              @DataDog/asm-python
ddtrace/internal/ci_visibility/telemetry/api_request.py                 @DataDog/ci-app-libraries
ddtrace/internal/ci_visibility/telemetry/constants.py                   @DataDog/ci-app-libraries
ddtrace/internal/ci_visibility/telemetry/coverage.py                    @DataDog/ci-app-libraries
ddtrace/internal/ci_visibility/telemetry/early_flake_detection.py       @DataDog/ci-app-libraries
ddtrace/internal/ci_visibility/telemetry/events.py                      @DataDog/ci-app-libraries
ddtrace/internal/ci_visibility/telemetry/git.py                         @DataDog/ci-app-libraries
ddtrace/internal/ci_visibility/telemetry/itr.py                         @DataDog/ci-app-libraries
ddtrace/internal/ci_visibility/telemetry/payload.py                     @DataDog/ci-app-libraries
ddtrace/internal/telemetry/constants.py                                 @DataDog/apm-core-python
ddtrace/internal/telemetry/metrics_namespaces.py                        @DataDog/apm-core-python
ddtrace/internal/telemetry/writer.py                                    @DataDog/apm-core-python
ddtrace/llmobs/_evaluators/ragas/faithfulness.py                        @DataDog/ml-observability
ddtrace/llmobs/_evaluators/runner.py                                    @DataDog/ml-observability
ddtrace/llmobs/_evaluators/sampler.py                                   @DataDog/ml-observability
ddtrace/settings/_otel_remapper.py                                      @DataDog/apm-core-python
tests/appsec/appsec/test_telemetry.py                                   @DataDog/asm-python
tests/appsec/contrib_appsec/utils.py                                    @DataDog/asm-python
tests/appsec/iast/test_telemetry.py                                     @DataDog/asm-python
tests/telemetry/app.py                                                  @DataDog/apm-python
tests/telemetry/test_telemetry_metrics.py                               @DataDog/apm-python
tests/tracer/test_processors.py                                         @DataDog/apm-sdk-api-python

@mabdinur mabdinur changed the base branch from main to munir/fix-namespace-for-span-pointer-metric November 27, 2024 16:59
@mabdinur mabdinur marked this pull request as draft November 27, 2024 17:00
@mabdinur mabdinur changed the title chore(telemetry): fixes namespace for span pointer metric chore(telemetry): improves typing for telemetry metric namespaces Nov 27, 2024
@pr-commenter
Copy link

pr-commenter bot commented Nov 27, 2024

Benchmarks

Benchmark execution time: 2024-12-20 19:50:00

Comparing candidate commit c6a9f2f in PR branch munir/fix-type-checking-for-telemetry-namespace with baseline commit 6ea56c5 in branch main.

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

scenario:iast_aspects-ospathbasename_aspect

  • 🟥 execution_time [+484.605ns; +535.410ns] or [+14.886%; +16.446%]

scenario:iast_aspects-ospathsplit_aspect

  • 🟥 execution_time [+483.347ns; +550.696ns] or [+12.678%; +14.444%]

Base automatically changed from munir/fix-namespace-for-span-pointer-metric to main November 27, 2024 21:02
@mabdinur mabdinur marked this pull request as ready for review December 16, 2024 16:20
@mabdinur mabdinur requested a review from a team as a code owner December 16, 2024 16:20
@mabdinur mabdinur enabled auto-merge (squash) December 16, 2024 19:54
Copy link
Contributor

@romainkomorndatadog romainkomorndatadog left a comment

Choose a reason for hiding this comment

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

LGTM from the CI Visibility side.

tests/appsec/contrib_appsec/db.sqlite3 Outdated Show resolved Hide resolved
@emmettbutler emmettbutler added the changelog/no-changelog A changelog entry is not required for this PR. label Dec 17, 2024
@datadog-dd-trace-py-rkomorn
Copy link

Datadog Report

Branch report: munir/fix-type-checking-for-telemetry-namespace
Commit report: c9dcd02
Test service: dd-trace-py

✅ 0 Failed, 863 Passed, 605 Skipped, 15m 3.63s Total duration (20m 33.36s time saved)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants