Skip to content
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

No block given error when Semantic Logger is used with the ForwardingLogger #1738

Closed
kaylareopelle opened this issue Oct 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kaylareopelle
Copy link
Contributor

This introduced a bug if the logger used is Semantic Logger.

OpenTelemetry error: no block given (yield)

Coming from: https://github.com/open-telemetry/opentelemetry-ruby/blob/main/sdk/lib/opentelemetry/sdk/forwarding_logger.rb#L41

@kaylareopelle kaylareopelle added the bug Something isn't working label Oct 1, 2024
@adamk9k
Copy link

adamk9k commented Oct 2, 2024

Thank you @kaylareopelle for opening this in the meantime I've figured out what the issue was. It was coming from common/lib/opentelemetry/common/utilities.rb version 0.20.0 when it looked like this

def untraced
  Context.with_value(UNTRACED_KEY, true) do |ctx, _|
    yield ctx
  end
end

upgrading to 0.21.0 that includes this #1634 fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants