Skip to content

chore(aiokafka): add instrumentation manifest - #19890

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
add_aiokafka_manifest
Aug 28, 2026
Merged

chore(aiokafka): add instrumentation manifest#19890
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
add_aiokafka_manifest

Conversation

@dd-evgenii-vasilev

@dd-evgenii-vasilev dd-evgenii-vasilev commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

Adds an instrumentation manifest for the aiokafka integration.

The manifest provides structured, machine-readable metadata describing the integration without requiring consumers such as the Integration Portal to parse tracer implementation code. It records:

  • The aiokafka package and integration identity
  • Kafka producer and consumer instrumentation categories
  • Kafka as the instrumented system
  • Message sends, single and batch receives, offset commits, and trace/Data Streams context propagation
  • The integration creation date derived from Git history

This PR does not change runtime behavior or public APIs.

Testing

  • All 46 aiokafka tests passed.
  • scripts/lint checks passed.

Risks

There is no runtime instrumentation risk because this change adds only a declarative YAML file.

The metadata could become stale if the aiokafka instrumentation changes without updating its manifest.

MANIFEST.in currently grafts the ddtrace directory, so the manifest may be included in source distributions unless packaging excludes it separately. This PR intentionally does not change packaging behavior.

Signed-off-by: evgenii.vasilev <evgenii.vasilev@datadoghq.com>
@dd-evgenii-vasilev dd-evgenii-vasilev added the changelog/no-changelog A changelog entry is not required for this PR. label Aug 27, 2026
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against main using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

No remaining files require a CODEOWNERS review.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 27, 2026

Copy link
Copy Markdown

Circular import analysis

⚠️ Existing circular imports

There are 3 circular imports that already exist on the base branch and have not been changed by this PR.

ddtrace.llmobs -> ddtrace.llmobs._evaluators -> ddtrace.llmobs._evaluators.format -> ddtrace.llmobs._experiment -> ddtrace.llmobs
ddtrace.errortracking._handled_exceptions.bytecode_injector -> ddtrace.errortracking._handled_exceptions.callbacks -> ddtrace.errortracking._handled_exceptions.collector -> ddtrace.errortracking._handled_exceptions.bytecode_reporting -> ddtrace.errortracking._handled_exceptions.bytecode_injector
ddtrace.appsec._asm_request_context -> ddtrace.appsec._iast._iast_request_context_base -> ddtrace.appsec._iast._iast_env -> ddtrace.appsec._iast.reporter -> ddtrace.appsec._exploit_prevention.stack_traces -> ddtrace.appsec._asm_request_context

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 27, 2026

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 240 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 240 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=135)
ddtrace.llmobs._integrations.bedrock_agents -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.internal.test_visibility.api -×-> ddtrace.trace  (product:ci_visibility -> product:tracing, score=133)
ddtrace.llmobs._integrations.openai_agents -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.llmobs._integrations.crewai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Aug 27, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog auto-retried 2 jobs - 2 passed on retry View in Datadog

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: c9772b3 | Docs | View more details | Give us feedback!

@dd-evgenii-vasilev
dd-evgenii-vasilev marked this pull request as ready for review August 27, 2026 13:05
@dd-evgenii-vasilev
dd-evgenii-vasilev requested review from a team as code owners August 27, 2026 13:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61a10505c3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ddtrace/contrib/internal/aiokafka/aiokafka.manifest.yaml Outdated
Comment thread ddtrace/contrib/internal/aiokafka/aiokafka.manifest.yaml
@pr-commenter

pr-commenter Bot commented Aug 27, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-27 13:24:47

Comparing candidate commit 61a1050 in PR branch add_aiokafka_manifest with baseline commit da11c97 in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 4 performance regressions! Performance is the same for 580 metrics, 10 unstable metrics, 1 known flaky benchmarks, 17 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:httppropagationinject-ids_only

  • 🟥 execution_time [+2.254µs; +2.411µs] or [+13.521%; +14.460%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+119.201µs; +124.690µs] or [+30.175%; +31.565%]

scenario:telemetryaddmetric-1-count-metric-1-times

  • 🟥 execution_time [+546.486ns; +589.588ns] or [+20.499%; +22.116%]

scenario:tracer-small

  • 🟥 execution_time [+33.733µs; +36.103µs] or [+10.588%; +11.332%]

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:coreapiscenario-context_with_data_listeners

  • unstable execution_time [-750.513ns; +734.379ns] or [-6.796%; +6.650%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-31.967ns; +34.331ns] or [-5.286%; +5.677%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1756.416ns; +1557.371ns] or [-10.276%; +9.111%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-1261.781ns; +1221.692ns] or [-9.715%; +9.406%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-340.718ns; +310.958ns] or [-9.293%; +8.481%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-261.048ns; +244.628ns] or [-8.995%; +8.429%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-71.392ns; +73.568ns] or [-5.962%; +6.144%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-3951.707ns; +4116.859ns] or [-9.565%; +9.965%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-722.925ns; +815.578ns] or [-8.869%; +10.006%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-59238.130ns; +58530.207ns] or [-9.510%; +9.397%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:span-start

  • 🟥 execution_time [+1.438ms; +1.688ms] or [+10.670%; +12.522%]

Known flaky benchmarks without significant changes:

  • scenario:errortrackingflasksqli-baseline
  • scenario:flasksimple-iast-get
  • scenario:iastaspects-casefold_aspect
  • scenario:iastaspects-casefold_noaspect
  • scenario:iastaspects-index_aspect
  • scenario:iastaspects-ljust_noaspect
  • scenario:iastaspects-lower_aspect
  • scenario:iastaspects-replace_aspect
  • scenario:iastaspects-swapcase_aspect
  • scenario:iastaspects-title_noaspect
  • scenario:iastaspects-translate_aspect
  • scenario:iastaspects-translate_noaspect
  • scenario:iastaspects-upper_noaspect
  • scenario:packagespackageforrootmodulemapping-cache_off
  • scenario:packagespackageforrootmodulemapping-cache_on
  • scenario:sethttpmeta-all-enabled
  • scenario:telemetryaddmetric-record-100-metrics

Comment thread ddtrace/contrib/internal/aiokafka/aiokafka.manifest.yaml
Comment thread ddtrace/contrib/internal/aiokafka/aiokafka.manifest.yaml
@dd-evgenii-vasilev

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: c9772b3601

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 5bd6b96 into main Aug 28, 2026
526 of 528 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the add_aiokafka_manifest branch August 28, 2026 14:01
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Aug 28, 2026
…19923)

## Description

Excludes integration `*.manifest.yaml` files from source distributions to minimize package size.

The [Instrumentation Manifest RFC](https://docs.google.com/document/d/18za_vEcA-hH4IEwRhebDhoQxQKSylCtwMeVDB3rYM4Y/edit?usp=sharing) will introduce a colocated manifest for every tracer integration, as illustrated by [PR #19890](#19890). These manifests are repository metadata and are not required at runtime.

Because `MANIFEST.in` grafts the entire `ddtrace` directory, the manifests would otherwise be included automatically in published sdists. Wheels already exclude them through the existing explicit package-data allowlist.

This change does not affect runtime behavior or public APIs.

## Testing

- Tested with `ddtrace/contrib/internal/aiokafka/aiokafka.manifest.yaml` file.
- Confirmed the previous `manifest.in` rules included the `*.manifest.yaml` file.
- Confirmed the new rule excludes it while retaining normal integration Python files.
- `scripts/run-tests --list MANIFEST.in` found no applicable test suites.
- `scripts/lint checks` passed.

## Risks

Low. The rule only excludes files ending in `.manifest.yaml` under `ddtrace` from source distributions. The files remain available in the repository.

## Additional Notes

No release note is required. Add the `changelog/no-changelog` label.


Co-authored-by: brett.langdon <brett.langdon@datadoghq.com>
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.

2 participants