Conversation
Flatten v1 ARRAY and KEY_VALUE_LIST attribute values into dotted keys (key.0, key.member) on spans, span links and chunk/payload attributes, as the v0.4 format does, and map BYTES to meta_struct. Previously they raised NotImplementedError, failing every /test/session/traces call of the session. Also apply the payload-level git metadata to the chunk's local root only and process tags to its first span only, instead of to every span.
Author
|
Already handled by that PR: #422 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
V1 (
/v1.0/traces) attribute values of type ARRAY, KEY_VALUE_LIST and BYTES raisedNotImplementedError. Because/test/session/tracesre-decodes every stored request, a single such span made the whole session return 400.key.0,key.member, recursively), with each leaf mapped like a scalar of its type (string → meta, int/double → metrics, bool → metrics 1/0). This applies to span, chunk and payload attributes. Span links get the same flattening with string leaves. Span events keep arrays astype: 4and flatten KV lists. This matches libdatadog's V1→v0.4 downgrade and thekey.Nshape that system-tests already asserts (for exampletest_otel_set_attributes_different_types_with_array_encodingandtest_otel_span_link_attribute_handling).meta_structon spans (msgpack-decoded, falling back to UTF-8 text). On links and events they become text._dd.git.commit.shaand_dd.git.repository_urlnow go only on each chunk's local root, and_dd.tags.processonly on each chunk's first span. Previously they went on every span. This is where v0.4 carried them, and where dd-trace-go's own V1 decoder puts process tags. Other payload attributes still apply to every span.Testing
tests/test_trace_v1_attribute_types.py(unit tests plus an HTTP regression test for/test/session/traces), and adjustedtest_trace_v1_payload_attributesfor the git placement.