-
Notifications
You must be signed in to change notification settings - Fork 117
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
[agents] Labels [formerly tags] management API #42
Comments
@elastic/apm-agent-devs Did you already make the move? The Java agent has deprecated Let's make sure to link the implementation issues so we can close this one 🙂 |
Adding in a question to this issue: Is there any plan to standardize on how these new API endpoints work in the agents? For example, some agents convert all tag values to strings before sending them to the APM server. This means if I add an agent that accepts strings, numbers, or booleans as a tag value, it doesn't matter, because the values will be coerced to strings when they hit Elasticsearch. |
The support for Number and boolean tags was added somewhat recently so probably some agents don't offer those yet. I don't think there are agents which don't support numbers and booleans on purpose. Probably they didn't see the need just yet. But I do think it makes sense to eventually align. |
I would consider using that support to be a breaking change as it would mean the agent would no longer work with versions of APM Server prior to that support being added. |
That's a very good point @Qard! Using number tags with an APM Server prior to 6.7 would result in schema violations. However, I think it's ok to add those methods and add a warning to the documentation to only use them on APM Server versions 6.7+ (which I will do now 😇). |
Since we are adding a new method @felixbarny , I think having exceptions to what we support with version of APM server makes things harder to keep track of. |
So even if we stop converting tag/label values to strings in the agents, Elasticsearch will just do it for us anyway after they have been sent up? This is news to me. If so, what was the reason for adding support for this in the first place? As a user of a dynamically typed language, being able to see the type of value is a nice feature 🙂 |
That's only true for the current index. For example, if you used to send up |
But that means there is a race condition. Whichever agent gets to index a tag for the first time in a specific index determines the type of the field. That's especially a problem when not all agent support numbers and users use the same tag names across different language stacks. I guess that's what @bmorelli25 meant. |
Yes, sorry, my initial comment wasn't very clear. Felix explains it better ^ |
I've really grown to like the idea of having three separate methods, As the type of the field is determined by the first value I think it's a good thing to have the user be explicit in their intent. |
We should be able to utilize |
Closing now that we have tracking issues for all the agents. |
context.tags
will be stored inlabels
with the next major version of apm-server per elastic/apm-server#1826. There is still an open question of whether to update the intake API as well, tracked in elastic/apm-server#1835, but that's outside of the scope of this issue.Here, let's decide if agents would like to [not] add/replace existing tag management api calls with those include
label
, egaddTag
->addLabel
tag
->label
setTag
andaddTags
->setLabel
andaddLabels
SetTag
->SetLabel
set_tag
->set_label
Proposal: alias functions substituting
label
fortag
soon, markingtag
deprecated for release in agents post 7.0 stack release (could even be before if docs can be suppressed). Wait until the next major of each agent after that point to remove thetag
functions.Per usual, please vote 👍 or 👎 for adopting this proposal and add any questions/comments. Checkboxes for implementation per-agent will be added if the proposal is accepted. We can also take this opportunity to sync apis across agents.
Please keep in mind whether these changes conflict with reserved words in each language.
This can be released by agents at any time but but some time near 7.0.0 to reduce confusion with
tags
ending up stored aslabels
.@elastic/apm-agent-devs please link your implementation issues
The text was updated successfully, but these errors were encountered: