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

OpenTelemetry: Allow filtering field resolver telemetry based on duration #7740

Open
cmeeren opened this issue Nov 19, 2024 · 0 comments
Open

Comments

@cmeeren
Copy link
Contributor

cmeeren commented Nov 19, 2024

Product

Hot Chocolate

Is your feature request related to a problem?

If I understand correctly, when configured with OpenTelemetry, HotChocolate currently creates a ResolveFieldValue activity/span for all async field resolvers, but not for sync field resolvers, presumably to reduce noise and data ingestion costs for the common case of sync resolvers.

I have many fields that are async (ValueTask) only because they perform some async locking. These generally complete synchronously in under 1ms. I would like to exclude these from being exported, just as if they were sync fields.

The solution you'd like

I have tried for several hours now to find a way of not exporting these, using processors and whatnot, but I haven't gotten anywhere. It would be great if HotChocolate provided some way of filtering trace telemetry from the source.

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

No branches or pull requests

1 participant