-
Notifications
You must be signed in to change notification settings - Fork 525
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
model/modeldecoder: stop extracting "user.user-agent" from metadata fields #3885
Comments
simitt
added a commit
to simitt/apm-server
that referenced
this issue
Jul 3, 2020
Decode request metadata into struct instead of a map and pass metadata struct into decoder function. implements elastic#3885
simitt
added a commit
to simitt/apm-server
that referenced
this issue
Jul 3, 2020
Decode request metadata into struct instead of a map and pass metadata struct into decoder function. The refactoring automatically fixes a bug where client.ip and user_agent was not set for v3 RUM events. implements elastic#3885 fixes elastic#3942
2 tasks
simitt
added a commit
to simitt/apm-server
that referenced
this issue
Jul 6, 2020
Decode request metadata into a struct instead of a map and pass the metadata struct into a decoder function. The refactoring automatically fixes a bug where the `client.ip` and `user_agent` were not set for v3 RUM events. implements elastic#3885 fixes elastic#3942
simitt
added a commit
to simitt/apm-server
that referenced
this issue
Jul 6, 2020
Decode request metadata into a struct instead of a map and pass the metadata struct into a decoder function. The refactoring automatically fixes a bug where the `client.ip` and `user_agent` were not set for v3 RUM events. implements elastic#3885 fixes elastic#3942
Closed by #3943 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In beater/middleware (in request_metadata_middleware.go) we record metadata fields related to the HTTP request received. When we process stream metadata, we first create a map based on the request metadata, and then layer on top the stream metadata.
One of the keys set by the middleware is
user.user-agent
, which is not part of the JSON Schema. In theory agents could send this field and the server would parse it.I propose we have the middleware record information into a struct, and then when decoding stream metadata we initialise the metadata struct with those fields explicitly. i.e. something like
The text was updated successfully, but these errors were encountered: