-
Notifications
You must be signed in to change notification settings - Fork 24.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
Integrate ES with APM #84631
Closed
Closed
Integrate ES with APM #84631
Conversation
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 pull request adds support for HTPP/gRPC with the OpenTelemetry SDK in the `apm-integration` plugin. It adds the required security permissions to the plugin to make it work - we should try to reduce this list one day. The plumbing to pass Elastic's Cloud APM server credentials is not fully there yet but the current `ApmIT` test can be executed with `-Dtests.apm.endpoint=https://... -Dtests.apm.token=ABC` and traces should be sent to Elastic APM. _Works on my machine™_
Task now implements the Traceable interface. This allows other traceable entities to be developed.
…80758) Pass a task's span context via the ThreadContext to parent nested tasks.
Adds a test case that creates and populates a couple of multi-shard indices and executes a search against them.
* Can be turned off with xpack.security.authz.tracing: false * AuthZ is tied to relevant task by traceparent (it however does not cover the first authZ) * x-opaque-id is auto configured at rest layer if not already exists. This helps chain all relevant actions together. * ApmIT now has security enabled.
…earch into feature/apm-integration
This commit adds a dynamic cluster setting called `xpack.apm.tracing.names.include` which allows the user to filter on the names of the transactions for which tracing is enabled.
pugnascotia
added
>feature
WIP
:Delivery/Tooling
Developer tooliing and automation
v8.2.0
labels
Mar 3, 2022
When starting a new tracing context, move the existing trace headers in the thread context so that they are prefixed with `parent_`. This then means that code elsewhere can add new trace headers without having to fiddle with the context first. Also wrap methods in TaskManager to better manage context around tasks.
Turns out that if you disabled authz tracing, it prevented tracing headers being sent to other nodes because the authz service still started a new trace context, without starting a new span. Also require callers of `TaskManager#register` to handle their own trace contexts. Callers of TaskManager#registerAndExecute` don't have to do this, which is most of the codebase. This is to avoid trace header pollution in the thread context.
Closing in favour of #87696. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cloud-deploy
Publish cloud docker image for Cloud-First-Testing
:Delivery/Tooling
Developer tooliing and automation
>feature
v8.4.0
WIP
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.
This PR merges in the proof-of-concept work for adding tracing to Elasticsearch. It uses the OpenTelemetry library, with the expectation that the traces will be sent to Elastic's APM integration.
Much of the APM-specific code is in the
apm-integration
plugin. Most of the rest of the changes are concerned with expression some activity in ES more clearly in terms of tasks, since this work maps tasks to spans.