feat: add tags to config#29
Conversation
duncanpharvey
left a comment
There was a problem hiding this comment.
Following up on @lucaspimentel's comment around comma and space separation - I think we should handle both cases. See below for an example implementation in the Node Tracer:
Convert space separation to comma separation: https://github.com/DataDog/dd-trace-js/blob/99e7bb4b0977de2daf85f0ddf9af5b3d420bb0db/packages/dd-trace/src/config.js#L827
Then parse comma separated tags: https://github.com/DataDog/dd-trace-js/blob/99e7bb4b0977de2daf85f0ddf9af5b3d420bb0db/packages/dd-trace/src/tagger.js#L26
Otherwise the comma separated tags work as expected DD_TAGS = "tagkey1:tagval1,tagkey2:tagval2" except in the case of filtering in the live trace view.
|
thanks @duncanpharvey! the lack of tag query in the live view is expected since the tags aren't applied to the traces a that point in our backend systems. i've added space-separated tag support as well. |
0462c35 to
e9d49db
Compare
What does this PR do?
Adding function tags for traces processed by the the datadog-trace-agent.
Trace metrics don't have these tags yet (are they computed in the tracer for serverless-components?)
Motivation
This will allow the backend to index traces by these trace tags, enabling trace search queries like
tag_name:valuerather than@tag_name:value(the latter would search for span meta attributes instead).Additional Notes
This has previously been implemented in the datadog-lambda-extension bottlecap agent and the serverless-init build of the datadog-agent.
Describe how to test/QA your changes
Added unit tests. Also deployed to a test app to confirm that these function trace tags are being added and result in searchable traces.