You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add injection metadata fields to telemetry forwarder (#13679)
## Overview
This change adds additional fields to the telemetry forwarder used
during injection. These fields will be used to add additional context
that will be surfaced to the end user in the following Figma:
<img width="1272" alt="Screenshot 2025-06-16 at 11 13 35 AM"
src="https://github.com/user-attachments/assets/c2070b96-fc55-4d38-bd4d-d43179c5a398"
/>
See [Injection
Metadata](https://docs.google.com/document/d/1wydXj2fW0V0jaWU6W9pIbipT_AXD15tmbTtOPXFBEy4/edit?tab=t.f3vpy615c2dp)
for more details.
## Testing Strategy
I used this forwarder file to write output.json
```bash
#!/bin/bash
TELEMETRY_PAYLOAD=$(cat)
echo $TELEMETRY_PAYLOAD > /Users/sydney.tung/go/src/github.com/DataDog/sydney/output.json
```
I used this python app
```python
#!/usr/bin/env python3
print("app complete")
```
I used this script
```bash
#!/bin/bash
[ -f /Users/sydney.tung/go/src/github.com/DataDog/sydney/output.json ] && rm /Users/sydney.tung/go/src/github.com/DataDog/sydney/output.json
export DD_APM_INSTRUMENTATION_DEBUG="true" #injector debug logging
export DD_INJECTION_ENABLED=true #injecting enable & forwarding
export DD_TRACE_DEBUG=true #debug logging for dd-trace-py
export PYTHONPATH=/Users/sydney.tung/go/src/github.com/DataDog/dd-trace-py/lib-injection/sources:$PYTHONPATH #path -> sitecustomize.py
export DD_TELEMETRY_FORWARDER_PATH=/Users/sydney.tung/go/src/github.com/DataDog/sydney/forwarder.sh #which forwarder excuted
python3 /Users/sydney.tung/go/src/github.com/DataDog/sydney/app.py #random app
cat /Users/sydney.tung/go/src/github.com/DataDog/sydney/output.json | jq
```
This is a sample output
```json
{
"metadata": {
"language_name": "python",
"language_version": "3.13.3",
"runtime_name": "cpython",
"runtime_version": "3.13.3",
"tracer_version": "unknown",
"pid": 49533,
"result": "unknown",
"result_reason": "unknown",
"result_class": "unknown"
},
"points": [
{
"name": "library_entrypoint.error",
"tags": [
"error_type:main_filenotfounderror"
]
}
]
}
```
## Checklist
- [x] 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
- [x] 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)
---------
Co-authored-by: brettlangdon <[email protected]>
lib-injection: Additional fields have been added to the telemetry forwarder used during Single Step to surface troubleshooting insights in the Datadog UI.
0 commit comments