-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[APM] Instrument beat pipeline #17938
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
f1f46d6
instrument output client
graphaelli e915775
capture publish errors
graphaelli 5d874d6
clean up some missed tests
graphaelli 7f8baae
Merge branch 'master' into publisher-apm
graphaelli 7197c08
remove unused Tracer reference
graphaelli a6ac9fa
create tracer with beat and share with output
graphaelli dbc936e
Merge branch 'master' into publisher-apm
graphaelli e592c1f
Merge remote-tracking branch 'elastic/master' into publisher-apm
jalvz 4cac58e
allow the tracer to be nil
jalvz 974cdb5
add comments
jalvz 0a6eb4f
capture reporting errors
jalvz 7d37861
fix pointer?
jalvz ede34e0
add transaction and spans tests
jalvz 2305281
Merge remote-tracking branch 'elastic/master' into publisher-apm
jalvz e48a29b
fix bad merge
jalvz 1f0643b
remove SetTracer
jalvz c4c11b1
remove other SetTracer and mage fmt
jalvz 037830f
Merge remote-tracking branch 'elastic/master' into publisher-apm
jalvz b29798e
sync vendor
jalvz d23b84a
make update
jalvz 890617c
add more context
jalvz f1f66bd
Update changelog
jalvz c706d8f
Merge remote-tracking branch 'elastic/master' into publisher-apm
jalvz 10c042b
Update libbeat/outputs/elasticsearch/client_integration_test.go
jalvz aec9c01
Code review comments
jalvz 1e7ed3a
Update dependencies
jalvz f540358
Update changelog
jalvz 8d2833a
update notice
jalvz 2f8c946
Add docs
jalvz b3a36d1
Merge remote-tracking branch 'elastic/master' into publisher-apm
jalvz df01669
fix merge
jalvz d79f144
fix tests
jalvz e307d6f
fix test again
jalvz f6c682b
more mage fmt
jalvz ce740a4
add comment
jalvz 5bf5bb1
re-add build tag
jalvz a1c5d3a
Merge remote-tracking branch 'elastic/master' into publisher-apm
jalvz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[[breaking-changes-7.8]] | ||
|
||
=== Breaking changes in 7.8 | ||
++++ | ||
<titleabbrev>7.8</titleabbrev> | ||
++++ | ||
|
||
{see-relnotes} | ||
|
||
//NOTE: The notable-breaking-changes tagged regions are re-used in the | ||
//Installation and Upgrade Guide | ||
|
||
//tag::notable-breaking-changes[] | ||
[float] | ||
|
||
==== APM Instrumentation | ||
|
||
Libbeat includes the Elastic APM Agent for instrumenting the publishing pipeline. | ||
Currently the Elasticsearch output is instrumented. APM can be enabled simply with | ||
setting the `ELASTIC_APM_ACTIVE` environment variable to `true` when starting the beat. | ||
To make tracing possible, the `Publish` method of the `Client` interface takes a | ||
`Context` object as first argument. That `Context` is intended for propagating | ||
request-scoped values, not for cancellation. | ||
|
||
// end::notable-breaking-changes[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
We should probably close the
apm.DefaultTracer
-- otherwise it will attempt to communicate with an APM Server on localhost.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 for APM Server we'll want to inject the server's custom tracer, so it can send events to itself without additional config.
I can see a couple of options:
Tracer
field to theSettings
struct, and use it if non-nil; otherwise create a new tracerapm.DefaultTracer
There's still going to be some awkwardness injecting the server's custom tracer: we would need to create a sort of "placeholder" tracer transport which we update once the server is active. That would be isolated to apm-server though.
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.
Sounds good. I'd rather leave that for a follow up, thou.