-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
site: add Tracing - interop with Java-instrumented libraries
page
#353
Conversation
dd88b4e
to
8cb5194
Compare
8cb5194
to
c40c69f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my only significant concern is the use of the global otel instance
def run: IO[Unit] = | ||
IOLocal(Context.root).flatMap { implicit ioLocal: IOLocal[Context] => | ||
implicit val local: Local[IO, Context] = localForIoLocal | ||
val otelJava: OtelJava[IO] = OtelJava.local(GlobalOpenTelemetry.get()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, otel recommends not using the global instance. is there another instance we can use relatively easily in examples? because examples invariably get copied into non-example code and end up in production
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An instance can be created AutoConfiguredOpenTelemetrySdk.builder().build()
. It creates an autoconfigured instance and does not make it global.
But in this particular example, it must be global because the instance is created by the Otel javaagent upon JVM startup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, otel recommends not using the global instance.
But other examples could be updated (e.g. #348)
09087e7
to
eb16ba7
Compare
Partially addresses #202.