clj-otel

jmv 2023-09-19T18:38:43.244779Z

is there any appetite for handling keywords for span names automatically? i find myself doing this a lot

(span/with-span! {:name (qualified-name ::my-span-name)}
  ...)

πŸ‘ 1
steffan 2023-09-20T12:20:52.549019Z

This sounds like a fair idea πŸ™‚ I like the idea of supporting alternatives to the span options map where it appears in the clj-api api. Supporting a string or keyword to provide a span name seems very reasonable. I think supporting the common case of supplying a span name and attributes would also be worthwhile.

steffan 2023-09-20T13:56:48.484319Z

An aside on steffan-westcott.clj-otel.util/qualified-name : The https://opentelemetry.io/docs/specs/otel/common/attribute-naming/ says that the attribute base name should be in snake_case. However, the https://opentelemetry.io/docs/specs/otel/trace/api/#span does not have this stipulation for span names. qualified-name is intended to be used for attribute names only, as it formats qualified keywords and converts all to snake_case. Using namespace-qualified keywords for span names is a good practice, but it is not required (and undesirable) to also convert them to snake_case.

πŸ‘ 1
steffan 2023-10-01T17:47:45.291649Z

I'll take a look at this now that I've got clj-otel release 0.2.4.1 out the door. I didn't fancy adding this on top of what is already a fairly chunky release πŸ™‚

πŸ™Œ 2
2023-09-20T05:37:17.167939Z

yes, it’ll be easier to mu/log it as an event too , since it expects keywords