-
Notifications
You must be signed in to change notification settings - Fork 55
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
Allow direct access to trace and span id for zio-logging's LogFormat #842
Allow direct access to trace and span id for zio-logging's LogFormat #842
Conversation
Hey, @andrzejressel! My opinion is that it should be done in a separate module (i.e. |
I don't understand why there are errors in |
Looking into it... |
The errors disappear if you remove all mentions of |
...zio-logging/src/main/scala/zio/telemetry/opentelemetry/zio/logging/TelemetryLogFormats.scala
Outdated
Show resolved
Hide resolved
...zio-logging/src/main/scala/zio/telemetry/opentelemetry/zio/logging/TelemetryLogFormats.scala
Outdated
Show resolved
Hide resolved
...zio-logging/src/main/scala/zio/telemetry/opentelemetry/zio/logging/TelemetryLogFormats.scala
Outdated
Show resolved
Hide resolved
...logging/src/test/scala/zio/telemetry/opentelemetry/zio/logging/TelemetryLogFormatsSpec.scala
Outdated
Show resolved
Hide resolved
...zio-logging/src/main/scala/zio/telemetry/opentelemetry/zio/logging/TelemetryLogFormats.scala
Outdated
Show resolved
Hide resolved
Cool ... |
Forgot to update documentation, I'll do that today |
sb-missinglink can't recognize the links during macro expansion for some reason, so we just need to ignore the entire
|
...elemetry-zio-logging/src/main/scala/zio/telemetry/opentelemetry/zio/logging/ZioLogging.scala
Outdated
Show resolved
Hide resolved
...elemetry-zio-logging/src/main/scala/zio/telemetry/opentelemetry/zio/logging/ZioLogging.scala
Outdated
Show resolved
Hide resolved
...elemetry-zio-logging/src/main/scala/zio/telemetry/opentelemetry/zio/logging/ZioLogging.scala
Outdated
Show resolved
Hide resolved
@andrzejressel Thanks for your contribution! I'm ready to merge it once the above comments are addressed 👍 |
I've added this new module to README |
I don't like the zio logging docs now to be honest, I'll add simpler usage with the standalone example |
All right, should be fine now - we can always refine it later. |
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.
Brilliant!
My usecase is https://togithub.com/zio/zio-telemetry/issues/558 but the other way around. I'm using zio-telemetry for trace/span management, but I use zio-logging to do actual logging.
I want to add trace-id and span-id to my logs, but there is no way to receive it from pure code (which LogFormat requires).
I also see some solution here: https://togithub.com/zio/zio-telemetry/pull/319#issuecomment-783105181, but I'm not sure which would be the prefered one.