strawberry Instrumentation is incomplete
Closed this issue · 4 comments
How do you use Sentry?
Self-hosted/on-premise
Version
sentry-sdk = { extras = ["django"], version = "2.34.1" }
Steps to Reproduce
I use strawberry-graphql = "0.272.1" with an async schema and
from sentry_sdk.integrations.strawberry import StrawberryIntegration
...
sentry_sdk.init(
dsn: ...,
integrations=[DjangoIntegration(cache_spans=True), StrawberryIntegration(async_execution=True)],
environment='production',
attach_stacktrace=True,
traces_sample_rate=0.02,
profile_session_sample_rate=0.02,
profile_lifecycle='trace',
Expected Result
This spans should show up in sentry:
span.set_data("graphql.field_name", info.field_name)
span.set_data("graphql.parent_type", info.parent_type.name)
span.set_data("graphql.field_path", field_path)
span.set_data("graphql.path", ".".join(map(str, info.path.as_list())))
Actual Result
I already confirmed/debugged, that this code is called
It looks like these spans are never sent to the server?
Hey @Speedy1991, thanks for raising.
If you confirmed the code is run, I'm wondering if maybe the resolve span is being attached to a wrong parent span. Do you see the resolve span anywhere else in the span tree in Sentry? Can you check the transaction payload for the missing span op, e.g. with a before_send_transaction?
import json
def before_send_transaction(event, hint):
print(json.dumps(event))
return event
sentry_sdk.init(
before_send_transaction=before_send_transaction,
...
)If you happen to have an example app for us to reproduce the issue that'd be awesome.
I'm on vacation right now but I'll check it in the 2nd week of September!
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀