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

Add graphql_operation_name to data dictionary for automated spans #4849

Open
Hans92 opened this issue Feb 14, 2025 · 1 comment
Open

Add graphql_operation_name to data dictionary for automated spans #4849

Hans92 opened this issue Feb 14, 2025 · 1 comment

Comments

@Hans92
Copy link

Hans92 commented Feb 14, 2025

Problem Statement

Currently, the data dictionary in beforeSendSpan does not include the graphql_operation_name key. Having access to this value would be very helpful, as it would allow us to modify the span by adding the URL and operation name. This would improve trace visibility and help differentiate HTTP spans for GraphQL operations

Solution Brainstorm

No response

Are you willing to submit a PR?

No response

@philipphofmann
Copy link
Member

Yes that makes sense. We already set this info for breadcrumbs here but not for spans.

if (self.isGraphQLOperationTrackingEnabled) {
breadcrumbData[@"graphql_operation_name"] =
[URLSessionTaskHelper getGraphQLOperationNameFrom:sessionTask];
}

Thanks for reporting this, I can't give you an ETA, though, @Hans92.

@philprime philprime moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants