-
Notifications
You must be signed in to change notification settings - Fork 514
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
Add support for sourcemap uploads #302
Conversation
e85b55c
to
4d6ccc4
Compare
@roncohen this is ready for review! |
Nice @jalvz! A couple comments:
|
cb2709b
to
1ce61cd
Compare
re. handling validation with parsing library: re. approved files: they look the same because tests ensure that passing attributes with null values is equivalent to not passing attributes. |
4th point above implemented here d4ab32d |
beater/handlers.go
Outdated
@@ -36,6 +37,7 @@ const ( | |||
BackendErrorsURL = "/v1/errors" | |||
FrontendErrorsURL = "/v1/client-side/errors" | |||
HealthCheckURL = "/healthcheck" | |||
SourcemapsURL = "/sourcemaps" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not versioned. It might be fine, but could you explain the rationale briefly?
_meta/beat.yml
Outdated
@@ -7,7 +7,7 @@ apm-server: | |||
# Defines the host and port the server is listening on | |||
host: "localhost:8200" | |||
|
|||
frontend.enabled: false | |||
frontend.enabled: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would enable frontend endpoints by default. I suggest we keep it off by default for now and reevaluate once we have sourcemap processing of errors in.
type: keyword | ||
description: > | ||
App version. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny thing: Could we put the sourcemap
field in here so it shows up in the docs but it will still not get indexed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. How do you do that? I can't find anywhere else where we do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No that's not possible, see #28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right 👍
Good work @jalvz! Getting close 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a changelog entry.
Otherwise LGTM
b6e4cf2
to
e3161eb
Compare
Cool @jalvz. Could you squash? |
e3161eb
to
603d16e
Compare
done. i wouldnt like to squash more than this, but if you are not happy with it feel free to squash and merge yourself. |
script/output_data/output_data.go
Outdated
@@ -28,7 +28,7 @@ func generate() error { | |||
|
|||
for path, mapping := range beater.Routes { | |||
|
|||
if path == beater.HealthCheckURL { | |||
if path == beater.HealthCheckURL || path == beater.SourcemapsURL { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there still a reason for skipping sourcemaps here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about adding sourcemaps to a docs/generated/sourcemaps
folder, and not to the intake-api
? So we would have it documented but clearly distinguished from standard intake API.
I suggest to merge this and add the doc script in a seperate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, updated
Refactor based on suggestions from @roncohen * Move sourcemap decoding to the sourcemap package * Change the way to build the payload * Make the decoder return a buffer
dc58209
to
83410e1
Compare
awesome! Great work @jalvz ! |
No description provided.