-
Notifications
You must be signed in to change notification settings - Fork 227
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
feat: Reporter for OTel Metrics #3152
Merged
Merged
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
…g the OTel SDK Users of this can use '@opentelemetry/api' for metrics. Those metrics will be sent to APM server via its native protocol (intake v2). This is a first stab. See this for the best example: examples/otel-metrics-poc/use-otel-metrics-via-elastic-apm.js
…age); disable the 'OTel Metrics PoC' provider (will clean this out later)
github-actions
bot
added
the
agent-nodejs
Make available for APM Agents project planning.
label
Feb 6, 2023
…just a Counter so far)
…r if metrics is not enabled (metricsInterval=0s)
because that means a user cannot use it. Instead we instrument otel.metrics.getMeterProvider() and provide one from the APM agent if the user hasn't registered one. That means that user code can use metrics from the OTel API: const otel = require('@opentelemetry/api') const meter = otel.metrics.getMeter('my-meter') const aCounter = meter.createCounter('a_counter') ... and if the APM agent is in use, then metrics will go to APM server.
…tel/sdk-metrics creation of a MetricProvider as needed
… draft spec Note that this differs from OTel Metrics SDK default for OTLP export.
…e current metrics system
… a type we cannot export
…e would be used anyway
This adds some grouping in the CI "tav.yml" workflow to avoid the 256 jobs GH Actions limit. I'm not yet sure if those will work well.
…uns after some of the nested package.json files have been 'npm install'd
…pendabot for separate packages
This reverts commit 1d501d0.
david-luna
reviewed
Apr 24, 2023
trentm
added a commit
that referenced
this pull request
May 16, 2023
With this change the APM agent adds support for using OTel Metrics in two ways: 1. The `@opentelemetry/api` package is instrumented so that usage of `.metrics.getMeterProvider(...)` will use one provided by the APM agent, if the user hasn't explicitly provided one of their own. This implementation uses a version of the OTel Metrics SDK included with the APM agent. It is configured to sent metrics to APM server by default. This allows a user to use the OTel Metrics API and get metrics set to APM server without any configuration. 2. Alternatively, the `@opentelemetry/sdk-metrics` package is instrumented so that when a user creates a `MeterProvider`, the APM agent will added a `MetricReader` that sends metrics to APM server. This allows a user to configure metrics as they wish using the OTel Metrics SDK and then automatically get those metrics sent to APM server. This also adds some grouping in ".ci/tav.json" for the TAV workflow to avoid the 256 jobs GH Actions limit. I'm not yet sure if those will work well. Closes: #2954 Refs: elastic/apm#691 Refs: elastic/apm#742 (spec PR)
6 tasks
fpm-peter
pushed a commit
to fpm-git/apm-agent-nodejs
that referenced
this pull request
Aug 20, 2024
With this change the APM agent adds support for using OTel Metrics in two ways: 1. The `@opentelemetry/api` package is instrumented so that usage of `.metrics.getMeterProvider(...)` will use one provided by the APM agent, if the user hasn't explicitly provided one of their own. This implementation uses a version of the OTel Metrics SDK included with the APM agent. It is configured to sent metrics to APM server by default. This allows a user to use the OTel Metrics API and get metrics set to APM server without any configuration. 2. Alternatively, the `@opentelemetry/sdk-metrics` package is instrumented so that when a user creates a `MeterProvider`, the APM agent will added a `MetricReader` that sends metrics to APM server. This allows a user to configure metrics as they wish using the OTel Metrics SDK and then automatically get those metrics sent to APM server. This also adds some grouping in ".ci/tav.json" for the TAV workflow to avoid the 256 jobs GH Actions limit. I'm not yet sure if those will work well. Closes: elastic#2954 Refs: elastic/apm#691 Refs: elastic/apm#742 (spec PR)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
With this change the APM agent adds support for using OTel Metrics in two ways:
@opentelemetry/api
package is instrumented so that usage of.metrics.getMeterProvider(...)
will use one provided by the APM agent,if the user hasn't explicitly provided one of their own. This implementation
uses a version of the OTel Metrics SDK included with the APM agent. It
is configured to sent metrics to APM server by default. This allows a user
to use the OTel Metrics API and get metrics set to APM server without any
configuration.
@opentelemetry/sdk-metrics
package is instrumented sothat when a user creates a
MeterProvider
, the APM agent will added aMetricReader
that sends metrics to APM server. This allows a user toconfigure metrics as they wish using the OTel Metrics SDK and then
automatically get those metrics sent to APM server.
Closes: #2954
Refs: elastic/apm#691
Refs: elastic/apm#742 (spec PR)