Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags should not be required to be a keyword list, and should support nesting #92

Open
GregMefford opened this issue Nov 28, 2018 · 2 comments

Comments

@GregMefford
Copy link
Member

Ultimately, these get encoded back into a map and sent to the collector, so there's no reason to enforce that they be a Keyword list (i.e. atom keys).

For example, it would be nice to be able to include some map of key-value pairs that were decoded from a JSON payload, but you don't want to convert all the keys to atoms. Also in this scenario, it would be nice to be able to have nested maps as values. On a Datadog-specific note: I believe this is possible, but we'd have to traverse the maps and change the names to a flat structure of dot-syntax keys like parent.child.key: value.

@zachdaniel
Copy link
Member

Yeah, that makes sense to me. We should be able to change the type of that option to [:map, :keyword], and then add code to handle that change on the sender side. I think we also want to make sure that they all get merged correctly.

I'm pretty sure merging tags is the right answer, at least. I'm pretty confident that it is.

@lswith
Copy link

lswith commented Mar 4, 2019

Here is an example of how tags can be used:
tags = %{ "elasticsearch.body" => body, "elasticsearch.method" => "GET", "elasticsearch.endpoint" => endpoint }

This then allows metadata to each span to something like this:
monitor-elasticsearch-datadog-apm-error-stack-trace-v3

(from this article here: https://www.datadoghq.com/blog/monitor-elasticsearch-datadog/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants