-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: OpenTelemetry tracing and metrics #246
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #246 +/- ##
==========================================
- Coverage 72.34% 69.51% -2.84%
==========================================
Files 27 28 +1
Lines 3920 4212 +292
==========================================
+ Hits 2836 2928 +92
- Misses 934 1132 +198
- Partials 150 152 +2 ☔ View full report in Codecov by Sentry. |
dabfbbf
to
4f72c83
Compare
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.
Just a couple if small things, then we can squash the commits.
e36c1a8
to
7ec99fe
Compare
This PR adds build-in support for OpenTelemetry. All GraphQL queries to the federated services served from bramble are instrumented, this includes service schema updates, service list updates, as well as federated queries from users. The telemetry is exported using the gRPC exporter.
7ec99fe
to
2fecc7d
Compare
Telemetry
This PR adds build-in support for OpenTelemetry. All GraphQL queries to the federated services served from bramble are instrumented, this includes service schema updates, service list updates, as well as federated queries from users. The telemetry is exported using the gRPC exporter.
Configuration
Since telemetry is build into bramble the configuration also lives in the bramble root
config.json
.enabled
will enable telemetry.url
are the url for the collector other system capable of receiving OTLP metrics and spans.insecure
allows skipping the TLS check when communicating with the collector.service_name
allows for the span service name to be set. Useful in multi-deployment settings.GraphQLClient
changesThe GraphQL client has been changed so it now returns the raw timeout error if such error is received. This allows for easier error type checking the processing the error.
Testing
Modified the
TestQueryExecutionServiceTimeout
to check on the type instead of an error string. This required some modifications to the run function, that now take a function that will test the response, moving the actual testing back into the overall test function itself. Nice.