Opentelemetry-js: OTLP Metrics Exporter

Created on 27 May 2020  路  6Comments  路  Source: open-telemetry/opentelemetry-js

Is your feature request related to a problem? Please describe.
Add the ability to export metrics using the OLTP protocol so we can export metrics to the opentelemetry-collector.

Describe the solution you'd like
It seems to make the most sense to add this ability to the opentelemetry-exporter-collector package. For reference, this functionality is already available in opentelemetry-go. I'm specifically interested in the implementation for the web.

PS: Maybe consider renaming this package to opentelemetry-exporter-otlp since the opentelemetry-collector is just one implementation of an OTLP collector.

Describe alternatives you've considered
Unless I missed something, I could not find an existing way of exporting metrics from the JS client over OTLP.

Additional context

feature-request

Most helpful comment

Hi, I've been working on this feature, so you can assign the task to me.

All 6 comments

Hi, I've been working on this feature, so you can assign the task to me.

opentelemetry has separate exporter for spans and metrics.
opentelemetry-exporter-collector is for span we are missing for metrics.
if I were to rename it I could probably call it
opentelemetry-exporter-spans (renamed from opentelemetry-exporter-collector)
opentelemetry-exporter-metrics - OTLP Metrics Exporter

@davidwitten welcome to the project! just so you know we have weekly meetings on wednesdays at noon ET if you would like to join.

@davidwitten in the future, if you're working on an issue please comment so we can assign it. It helps us to know which issues are being worked on.

One thing I was wondering about when considering to use this from a browser front-end is how to protect the collector from spam. For example, by limiting the metrics (and labels) that can be ingested. Does anyone have experience with that?

@dyladan @obecny Hi, I've been working on this issue. While creating the types, I noticed that the open-telemetry-proto in the repo is from 2 months ago.

Should I update the proto to the most recent commit? I previously tried updating it, but it failed in my tests because the collector itself still used the old proto.

Edit: I just noticed that v0.4.0 of the collector was released 2 days ago. After updating, the new proto works, so I will update my code to use that.

Was this page helpful?
0 / 5 - 0 ratings