honeycombio / honeycomb-opentelemetry-java

Honeycomb's OpenTelemetry Java SDK distribution
22 stars 10 forks source link

Missing `meterProvider` on `OpenTelemetryConfiguration` #444

Open Falci opened 11 months ago

Falci commented 11 months ago

I have the impression we are missing a meterProvider in here:

https://github.com/honeycombio/honeycomb-opentelemetry-java/blob/f93f485996673bda9a3874e8d231d82ac40947c8/sdk/src/main/java/io/honeycomb/opentelemetry/OpenTelemetryConfiguration.java#L356-L359

If we don't, calls to gauge (and I suppose other metrics as well) will be ignored

        openTelemetry.meterBuilder("name")
            .setInstrumentationVersion("1.0.0")
            .build()
            .gaugeBuilder("gauge")
            .buildWithCallback(result -> {
                result.record(0);
            });

(Couldn't find this source code) image

MikeGoldsmith commented 11 months ago

Hi @Falci - thanks for opening the issue.

You're correct that metrics are not currently supported with our SDK distro. At the time we created it, they metrics API wasn't stable and we haven't gone back to add it so far. We'll add it to our items to review to see if it makes sense for us to add it now.

Unfortunately, it's not as simple as just adding it as there are many environment variables, config files and more we need to consider to make sure we do it correctly. Thanks for your patience.