Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
New tracer #3836
New tracer #3836
Changes from 6 commits
fb3c5a5
3639af2
981ecfe
1b66e0e
a1f60f8
448daac
ab2e5a1
351a81a
df43748
2944c67
e468b8f
d326674
a716180
053abd2
43613a4
816a7d0
8840b2d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
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.
Instead of holding onto that old code, can we instead dynamically rename
apm-server.instrumentation
toinstrumentation
, if the latter doesn't exist in the config?I think we can do this by defining a ConfigOverride in libbeat/cmd/instance.Settings, whose Check method checks for existing "instrumentation", and if not specified sets it to "apm-server.instrumentation"
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.
Hmm how would that exactly work?
Config
is just a config, not a function, so how do I copyapm-server.instrumentation
?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 meant make
Check
do the modification. It would be a bit of a hack, so it should really be replaced with something more fit for purpose. But in the mean time...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.
ah, uh. that's quite a hack, yes..
ok
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.
How about not using
Check
but changinglibbeatConfigOverride
to be a function and taking care of the overwrite there?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.
But how do I pass to a function the original config I need to copy?
Or you mean to change the whole thing in libbeat?
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 presume @simitt meant changing libbeat. I think that's the right long-term solution. IMO,
ConditionalOverride
should be an implementation of an interface likeConfigTransformer
:We could then provide an alternative implementation of that interface which does what we need.