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

Gh-3187: Add Open Telemetry proof of concept #3189

Merged
merged 13 commits into from Apr 22, 2024

Conversation

tb06904
Copy link
Member

@tb06904 tb06904 commented Apr 9, 2024

Adds a basic implementation of Open Telemetry that will record Spans across executions of Operations/OperationChains. Can be toggled on via a otelActive option in the graphConfig.json (off by default). Hopefully is a useful start point to be expanded on if required.

Is difficult one to demonstrate via unit testing but been manually tested to ensure Spans look useful with relevant data via a Jaeger UI. Uses the auto configure feature of Open Telemetry so can be easily configured where and how to export data to via environment variables e.g.

  • OTEL_SERVICE_NAME=gaffer-rest - sets the service name to gaffer-rest
  • OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://jaeger:4317 - sets the endpoint to export traces to e.g. Jaeger
  • OTEL_TRACES_EXPORTER=console - sets the exporter to console rather than the default of OTEL (needs to be OTEL to work with Jaeger).

Related issue

Copy link

codecov bot commented Apr 10, 2024

Codecov Report

Attention: Patch coverage is 72.50000% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 66.70%. Comparing base (1836a6f) to head (a8e9fde).

Files Patch % Lines
...a/uk/gov/gchq/gaffer/commonutil/otel/OtelUtil.java 0.00% 10 Missing ⚠️
...ain/java/uk/gov/gchq/gaffer/graph/GraphConfig.java 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3189   +/-   ##
==========================================
  Coverage      66.70%   66.70%           
+ Complexity      2559     2558    -1     
==========================================
  Files            907      908    +1     
  Lines          29076    29113   +37     
  Branches        3241     3243    +2     
==========================================
+ Hits           19396    19421   +25     
- Misses          8248     8259   +11     
- Partials        1432     1433    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GCHQDeveloper314 GCHQDeveloper314 changed the title Gh-3187 Open Telemetry proof of concept Gh-3187: Add Open Telemetry proof of concept Apr 11, 2024
@GCHQDeveloper314 GCHQDeveloper314 merged commit 138eed5 into develop Apr 22, 2024
26 checks passed
@GCHQDeveloper314 GCHQDeveloper314 deleted the gh-3187-open-telemetry-proof-of-concept branch April 22, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a Open Telemetry proof of concept for Operation calls
4 participants