-
Notifications
You must be signed in to change notification settings - Fork 5
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
[andr] Augment http logs with extra fields for gql requests #141
Conversation
.serverUrl("https://apollo-fullstack-tutorial.herokuapp.com/graphql") | ||
.addInterceptor(CaptureApollo3Interceptor()) | ||
.okHttpClient(okHttpClient) | ||
.addInterceptor(CaptureApolloInterceptor()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the extra integration point the customers would need to add. Note that this only works with okhttpclients that use our CaptureOkHttpEventListenerFactory
platform/jvm/gradle-test-app/src/main/java/io/bitdrift/gradletestapp/FirstFragment.kt
Outdated
Show resolved
Hide resolved
// TODO(murki): Augment request logs with | ||
// request.executionContext[CustomScalarAdapters]?.let { | ||
// addHttpHeader("x-capture-span-gql-field-operation-variables", request.operation.variables(it).valueMap.toString()) | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's questionable whether gql variables https://graphql.org/learn/queries/#variables could contain PII, plus they're generally pretty big in size. Since we don't currently show it in our default dashboards I think we can ship this version without including them just yet
Adds 3 fields (
_operation_id, _operation_name, _operation_type
) on top of all existing ones, plus using a diff name"_span_name": "_graphql",
http REST response:
http GraphQL response: