-
Notifications
You must be signed in to change notification settings - Fork 528
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
Only store defined attributes from context
in ES.
#411
Comments
We've previously decided to keep |
@roncohen should we look into this now for 6.3? |
@roncohen can we please revisit this for 6.3 as we realized that e.g. @jahtalab is sending additional data within In case we decide to add more defined attributes in the future that should be indexed, this would be a breaking change afaict, as it could break existing indices if the new attribute was stored with a different type. Also we might end up with a completely different schema for different agents. |
update: as those fields won't get indexed, changes to the schema should not break anything. However this could still lead to a different data structure in ES than defined or expected. |
From an agent developers point of view, I'm ok with locking down the properties under From time to time we need a new root property under |
Especially with the unauthorized endpoint for the RUM agent, a malicious user could send arbitrary data and flood ES. This is a general problem we might want to address with rate limiting, but we might also want to limit which types of fields can be sent. Together with an upper limit for the values (for example 1024 chars), 50 stacktrace elements etc. we effectively have an upper limit for one span, which probably helps. |
@roncohen can we revisit if this is a feature or a bug for V2, and then decide and close this issue. |
Currently we're sending the following additional fields:
I'm ok with locking down the context and/or setting limits on the values. |
I suggest all @elastic/apm-agent-devs are listing the currently added attributes, so we can formalize them on the JSON schema and then stop processing additional data sent within |
sounds good to me |
No added attributes in Ruby agent. |
No added attributes in the Java agent. |
None for Go. |
We are going to aim to do this for V2, but needs more investigation and probably will also be applied to V1. This isn't considered a blocker for V2 GA. |
I need to add these additional fields to the span context:
I think we should start adding these additional fields to the v1 and v2 schemas for documentation purposes even though this is not enforced yet. Should I make PR? Also a general question, will the the whole request fail if there are additional fields or will they just not get stored? |
@jahtalab feel free to open a PR on this. In case additional fields are sent the server will just ignore them, but process the request otherwise. This is already the case for all other fields, to keep the upgrade path easy. (Otherwise the server would need to be updated before the agents can update). |
Trying to catch up - what is the current status, and how is this going to look like with ECS? |
We haven't implemented that yet, but according to #411 (comment) it would be fine to add it if we manage in time. |
@roncohen @alvarolobato I would appreciate a decision on this to either close the issue or plan/prioritize 7.0 work accordingly |
thanks @jalvz Reading through the issue, I'm just making sure: Is the intention to change the server so that it would reject unknown fields under I'm fine to stop storing them, but I think rejection could be problematic. We're also not rejection unknown fields anywhere on the root, for example, so it would be strange to start doing it here. |
Thanks for the update @roncohen. This issue is about stop storing unknown attributes, not rejecting them. |
@elastic/apm-agent-devs as discussed offline, the plan is to NOT store additional, not defined attributes sent up by the agents from 7.0 on. |
We decided to only store objects defined in the json spec for the Intake API sent under the key |
Json validation allows agents to send up additional information without failing. Ensure that only the defined information is stored in ES, except for
context.custom
andcontext.tags
where we specifically allow for additional values.The text was updated successfully, but these errors were encountered: