clj-otel

Bill Adams 2024-06-11T17:25:10.200519Z

Hi @steffan! Do you have a date planned to cut a v 2.7 tag? Looking forward to using the synchronous gauge :)

Bill Adams 2024-06-21T17:01:49.771059Z

Greetings @steffan - do you think a 0.2.7 might be available sometime next week? There's no rush btw. 🙂 - just checking in. Cheers!

steffan 2024-06-21T17:22:52.109129Z

Hello! I know I promised a release which is running a little late. Be assured I am working on it and should get it out soon, perhaps by early next week. I am working (right now!) on Grafana dashboards for all the microservice examples. I think it's worth making the effort now to showcase what one can get "for free" with the metrics provided by OpenTelemetry Java out-of-the-box instrumentation. For example, with a small tweak in Grafana's span metrics configuration, one can get a breakdown of HTTP server metrics by route, which I think is very useful. I've configured a Grafana dashboard that automatically breaks down the metrics by route for any instrumented HTTP service.

Bill Adams 2024-06-21T20:36:11.621699Z

We'll take it whenever you get to it. No worries! Thanks again for all you diligence and hard work. Have a great and restful weekend!

Bill Adams 2024-06-11T17:25:53.010519Z

We are enjoying using your library at work.

steffan 2024-06-11T17:31:39.640939Z

I'm glad to hear you are enjoying clj-otel 😄 I should be releasing 0.2.7 within the next 7 days. I am working on adding Grafana dashboards to the microservices examples. They will feature traces and metrics. The JVM metrics provided by Java OpenTelemetry out-of-the-box are illuminating and deserve to be displayed clearly and coherently.

🙌 2
steffan 2024-06-11T17:37:16.853879Z

The following release may be 0.3.0, as that will introduce some long-planned work for the logs signal. There will be some small breakage (sorry!) as changes are made to clj-otel to make entire applications "bound context" aware for correct logging of context throughout, not just the Clojure parts.

👍 1
lepistane 2024-06-11T19:03:02.442019Z

Playing around with attributes i got

[otel.javaagent]  WARN io.opentelemetry.sdk.metrics.internal.state.DefaultSynchronousMetricStorage - Instrument count has exceeded the maximum allowed cardinality (1999).
as i don't want to remove the attributes i have and combining them would allow me to reach cardinality limit in 1-2 weeks i am looking for more permanent solution. I'd also want to avoid using histograms because at the end of the day they would reach limit at some point as well. Is there a way to setup expiration of the labels added? Or to reset counter after some time so that i am never at the mercy of the limit? edit maybe histogram is a way to go... and i am overthinking with the expiration.. i dont know 😕 wanted to add attribute growth is basically entity + bunch of event names. Why am i tracking it like this? I just wanted to compare different entities on different environments and maybe visualize differences in events.

steffan 2024-06-11T20:31:52.732219Z

Attributes need to be of low cardinality, as there is a limit of 2000 distinct sets per instrument. This is quite a generous limit. If you are getting anywhere close to this limit, you need to reconsider the attributes you are using.

👍 1
steffan 2024-06-11T21:00:00.921829Z

Say you are attempting to count the number of events by event type across a number of application instances. The number of event types might be too high, but perhaps they can be grouped in some way that still give insight.

👍 1
steffan 2024-06-11T21:01:58.833519Z

Alternatively, consider if raw metrics is an appropriate tool for the task at hand. You may want to consider deriving metrics from logs instead.

👍 1
steffan 2024-06-11T21:05:16.324759Z

If you absolutely must have high cardinality, then Honeycomb might be a good telemetry backend to consider.

👍 1
steffan 2024-06-11T21:32:44.902199Z

If you were using OTLP rather than Prometheus to export metrics, you could try setting system property otel.exporter.otlp.metrics.temporality.preference to LowMemory to make the OTLP exporter use delta temporality (i.e. send changes) rather than cumulative temporality (i.e. send all values since application start) See https://opentelemetry.io/docs/specs/otel/metrics/sdk_exporters/otlp/ I have no idea if this would help, so maybe not a sound idea.

👍 1