This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-04-05
Channels
- # announcements (7)
- # beginners (10)
- # calva (14)
- # clj-otel (8)
- # clojure (42)
- # clojure-europe (20)
- # clojure-nl (1)
- # clojure-norway (22)
- # clojure-spec (8)
- # clojure-uk (7)
- # core-async (10)
- # cursive (1)
- # events (1)
- # hyperfiddle (20)
- # introduce-yourself (1)
- # jobs-discuss (11)
- # lsp (48)
- # missionary (3)
- # music (1)
- # off-topic (7)
- # overtone (9)
- # pedestal (21)
- # rdf (1)
- # releases (3)
- # shadow-cljs (22)
- # specter (13)
- # squint (1)
- # yamlscript (3)
Does it matter if use 1.x or 2.x javaagent? what do you suggest. https://mvnrepository.com/artifact/io.opentelemetry.javaagent/opentelemetry-javaagent
OpenTelemetry instrumentation agent 2.x has several https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v2.0.0, notably around some default OTLP protocols and semantic conventions. I suggest using migrating to 2.x as soon as is convenient. The clj-otel
documentation and examples have been updated such that they assume agent 2.x is used.
Hi! Is there a technical reason that steffan-westcott.clj-otel.api.trace.http/wrap-server-span
does not do the captured-request-headers
part of (wrap-server-request-attrs create-span-opts)
when :create-span? false
?
See-also: https://github.com/steffan-westcott/clj-otel/issues/17
Found an alternative: https://opentelemetry.io/docs/languages/java/automatic/configuration/#capturing-http-request-and-response-headers
clj-otel
has no influence on the agent. Please see the longer answer https://github.com/steffan-westcott/clj-otel/issues/17#issuecomment-2040695513.
Thanks, @U2C6SPLDS! Just for my own understanding of OTel semantics: clj-otel cannot add attributes to an existing span? They can only be set at the time the span is created?
The clj-otel
function add-span-data!
can be used to add attributes to an existing span. However, it is not advisable to add HTTP header attributes to a span created by the agent. The values of some HTTP headers may be security sensitive. When using the agent, one would expect the definitive list of headers to add to server spans to be specified in the agent configuration. It would be surprising if other headers not in that list were also added.
In general, clj-otel
can configured to add basic telemetry data for applications that are run without the agent, such as HTTP server spans and metrics. However, clj-otel
is documented and designed not to add this data for applications that are run with the agent. The agent will always provide data of superior quality than data from clj-otel
, because the agent is tightly integrated with the supported libraries.
Thanks for this additional context!