gchq / Gaffer

A large-scale entity and relation database supporting aggregation of properties
Apache License 2.0
1.75k stars 353 forks source link

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

Closed tb06904 closed 2 months ago

tb06904 commented 3 months ago

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.

Related issue

codecov[bot] commented 3 months ago

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 :warning:
...ain/java/uk/gov/gchq/gaffer/graph/GraphConfig.java 87.50% 1 Missing :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.