Skip to content
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 exporting OpenTelemetry Metrics #337

Closed
axw opened this issue Sep 4, 2020 · 12 comments
Closed

Add support for exporting OpenTelemetry Metrics #337

axw opened this issue Sep 4, 2020 · 12 comments

Comments

@axw
Copy link
Member

axw commented Sep 4, 2020

Is your feature request related to a problem? Please describe.

We recently introduced an Elastic exporter for OpenTelemetry Collector. This exporter currently only supports exporting traces. Users would also like to export metrics.

Describe the solution you'd like

Extend the Elastic exporter to also export metrics to Elastic APM Server. We can start with simple scalar metrics, and add support for distribution metrics once elastic/apm-server#3195 is done.

Describe alternatives you've considered

Use the Prometheus exporter with Metricbeat.

Additional context

open-telemetry/opentelemetry-collector#1720 was recently merged, which means we can now proceed to build metrics support without working on top of legacy code.

@axw
Copy link
Member Author

axw commented Sep 4, 2020

@elastic/apm-server @cyrille-leclerc FYI

@axw
Copy link
Member Author

axw commented Sep 4, 2020

@sorantis FYI also. It would be great to ensure these metrics work well with the Metrics UI. (In addition to metrics coming through APM Server from other sources.)

@sorantis
Copy link

sorantis commented Sep 4, 2020

We're currently working on the Inventory Schema that will formalize the fields and metrics across different providers (aws, azure, on-prem, etc.). The main goal with this initiative is to shift to resource centric views and ensure that anything that complies with the schema is visualized in Metrics UI.

Is this something that can be used for the OT metrics?

@sorantis
Copy link

sorantis commented Sep 4, 2020

cc: @kaiyan-sheng @exekias

@axw
Copy link
Member Author

axw commented Sep 7, 2020

@sorantis OpenTelemetry defines "semantic conventions", which describe resources with which metrics, traces, and logs are associated: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/resource/semantic_conventions/README.md

I won't bore you with the details, but these will end up being recorded as ECS fields in Elasticsearch in the metric docs.

OpenTelemetry does not cover specific metrics AFAIK, so we probably wouldn't end up overlapping metric names.

@exekias
Copy link

exekias commented Sep 7, 2020

I see most of the fields for host, container, cloud, etc already map to our ECS names. Are you planning to convert the fields that don't match (ie renaming cloud.zone to cloud.availability_zone)?

@axw
Copy link
Member Author

axw commented Sep 7, 2020

@exekias yes, the OpenTelemetry conventions will be translated to ECS. We haven't done that for the cloud.* fields yet, but we will sooner or later.

@axw
Copy link
Member Author

axw commented Oct 2, 2020

PR adding initial support for gauge and sum (counter) metrics: open-telemetry/opentelemetry-collector-contrib#1173

@axw
Copy link
Member Author

axw commented Oct 7, 2020

Update: initial metrics support has landed in opentelemetry-collector-contrib. When we have support for histograms in the server/protocol, we'll update the exporter.

@d-baranowski
Copy link

@axw I stumbled upon https://pkg.go.dev/github.com/elastic/opentelemetry-exporter but I noticed it is archived. Is there a different opentelemtry exporter I can use?

@axw
Copy link
Member Author

axw commented Nov 24, 2020

@d-baranowski the exporter lives at https://github.com/open-telemetry/opentelemetry-collector-contrib.
You can find more details at https://www.elastic.co/guide/en/apm/get-started/current/open-telemetry-elastic.html

The repo you found was from a very early effort which we abandoned. I'll go ahead and delete that to avoid further confusion.

@axw
Copy link
Member Author

axw commented Dec 1, 2020

Closing this as we've updated the exporter with metrics support. I've opened #377 to track support for histogram metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants