You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After turning on the enable_platform_field option to report execute_field and execute_field_lazy spans in our APM, we can now see some tests raise this error:
invalid span attribute value type NilClass for key 'graphql.field.parent' on span 'graphql.execute_field'
There are cases where we will add nil to graphql.field.parent, for example when the spans are parentless.
OpenTelemetry will validate the span attributes, will ignore invalid attributes and optionally call handle_error when doing so.
Our test helper currently raises an exception when handling such an error, which causes test failures.
We've had to specifically ignore the invalidgraphql.field.parent attribute message. We also do a similar thing for the code.namespace field:
next if message&.start_with?("invalid span attribute value type NilClass for key 'code.namespace'")
next if message&.start_with?("invalid span attribute value type NilClass for key 'graphql.field.parent'")
Share details about your runtime
N/A
The text was updated successfully, but these errors were encountered:
elenatanasoiu
changed the title
Allow graphql.field.parent and controller to be nil
Allow graphql.field.parent and code.namespace to be nil
Feb 13, 2024
Description of the bug
Source of the problem: https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_tracer.rb#L88
After turning on the
enable_platform_field
option to reportexecute_field
andexecute_field_lazy
spans in our APM, we can now see some tests raise this error:There are cases where we will add
nil
tographql.field.parent
, for example when the spans are parentless.OpenTelemetry will validate the span attributes, will ignore invalid attributes and optionally call
handle_error
when doing so.Our test helper currently raises an exception when handling such an error, which causes test failures.
We've had to specifically ignore the invalid
graphql.field.parent
attribute message. We also do a similar thing for thecode.namespace
field:Share details about your runtime
N/A
The text was updated successfully, but these errors were encountered: