Skip to content

Conversation

mjq
Copy link

@mjq mjq commented May 31, 2025

This gem currently errors at runtime with ArgumentError: unknown keyword: :resource when used with certain instrumentation (e.g. this trace call in async-http). The gem depends on traces version ~> 0.10, but Interface#trace is missing the resource: parameter introduced in version 0.5.0. Update the interface to accept this keyword.

Types of Changes

  • Bug fix.

Contribution

`traces` version `0.5.0` introduced the `resource:` parameter to
`Interface#trace`. Update the OpenTelemetry backend to accept this keyword.

module Interface
def trace(name, attributes: nil, &block)
def trace(name, resource: nil, attributes: nil, &block)
Copy link
Author

@mjq mjq May 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm currently ignoring the value of resource as, as far as I can tell, there isn't an equivalent in OpenTelemetry's span data model for it like there is in DataDog's.

Merging e.g. {"resource" => resource} into the attributes hash would be another option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant