opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

Document how component developers can add metrics to their code

Open jpkrohling opened this issue 4 years ago • 6 comments
trafficstars

Once the move from OC to OpenTelemetry SDK happens (#816), we need to enhance the contributing guideline with information on how component developers can add metrics to their own code. As part of this task, it should be evaluated whether it makes sense to add similar docs to the collector's documentation on the website.

jpkrohling avatar Oct 13 '21 21:10 jpkrohling

@djaglowski FYI.

tigrannajaryan avatar Oct 14 '21 13:10 tigrannajaryan

@jpkrohling we already expose "MeterProvider" in the CreateParams (I know is a no-op) so components can start using that (will be some time until we will enable them though).

bogdandrutu avatar Nov 11 '21 00:11 bogdandrutu

This is at the top of my todo and will work on it soon.

jpkrohling avatar Nov 11 '21 09:11 jpkrohling

I created a PR as a first step towards defining the pattern we want to recommend to component developers. I would like to ask everyone in this thread to take a look at it and share their thoughts.

jpkrohling avatar Nov 25 '21 15:11 jpkrohling

I created a PR as a first step towards defining the pattern we want to recommend to component developers. I would like to ask everyone in this thread to take a look at it and share their thoughts.

@jpkrohling Do you mind sharing the PR link again? I can't seem to find the PR which talks about adding metrics to a component. I do see PR on checklist for components but can't find one which talks about adding more metrics.

shubhanshus avatar Jul 13 '22 00:07 shubhanshus

The PR I mentioned was a WIP to start a discussion but was ultimately closed. You can look at components like the load balancing exporter for an example of how to add metrics to a component, but we do not have official guidelines yet, as we are blocked by the availability of the OpenTelemetry Go SDK.

jpkrohling avatar Jul 13 '22 13:07 jpkrohling