Would like to use otel4s as alternative for Scala Spark Structured Streaming project #1043
-
|
Hello there, This is my first post in this repo. I wanted to reach out in order to ask for help. Our Scala Spark Structured Streaming job will consume the message (that has valid traces), perform some enrichment, and store it in the DB (like the examples in the doc with Redis). Upstrean app -> kafka <-> Spark app -> DB We would like to 1) propagate, continue the trace from the message in Kafka (which has a valid trace parent header) and 2) trace the DB call (but let us focus on 1 ) We have written the following in Scala, using the latest 1.19.0 opentemeletry suite (API, SDK, Exporter OTLP) For some reason unknown to use, this code is not working, in terms that we can see a good span object with the child (from the print function) but we cannot see any trace in any of our tracing backends (we tried Tempo, Lightstep, Datadog, ElastocSeach APM, no luck) From the reading of your post, it might be due to Context and ThreadLocal, but we are not sure, hence, continue to read your docs. Do you allow me to ask:
Thank you again and good day. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hey! otel4s uses opentelemetry-java under the hood. OtelJava.autoConfigured[IO].use { otelJava =>
... // your code
}The env variables are:
And here are a few configuration examples: |
Beta Was this translation helpful? Give feedback.
Hey!
otel4s uses opentelemetry-java under the hood.
I suggest experimenting with an auto-configured instance and using env variables as configuration options:
The env variables are:
And here are a few configuration examples: