Skip to content

Commit

Permalink
fix(profiling): tag serialisation in HTTP exporter [backport 2.8] (#9042
Browse files Browse the repository at this point in the history
)

Backport 0bacde0 from #9032 to 2.8.

Ensure that the HTTP exporter does not fail to serialise the tags.

Addresses #8996.

## Checklist

- [x] Change(s) are motivated and described in the PR description
- [x] Testing strategy is described if automated tests are not included
in the PR
- [x] Risks are described (performance impact, potential for breakage,
maintainability)
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed or label `changelog/no-changelog` is set
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/))
- [x] Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
- [x] If this PR changes the public interface, I've notified
`@DataDog/apm-tees`.

## Reviewer Checklist

- [x] Title is accurate
- [x] All changes are related to the pull request's stated goal
- [x] Description motivates each change
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- [x] Testing strategy adequately addresses listed risks
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] Release note makes sense to a user of the library
- [x] Author has acknowledged and discussed the performance implications
of this PR as reported in the benchmarks PR comment
- [x] 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: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and P403n1x87 committed Apr 22, 2024
1 parent 274535c commit 7405b83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ddtrace/profiling/exporter/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def _get_tags(

tags.update(self.tags)

return ",".join(tag + ":" + value for tag, value in tags.items())
return ",".join(f"{tag}:{value}" for tag, value in tags.items())

def export(
self,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
profiling: fix a bug that caused the HTTP exporter to crash when attempting to serialize tags.

0 comments on commit 7405b83

Please sign in to comment.