feat: move OTEL to a new 'InstrumentedFosite' #763
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The recent change in [#761 ] introduces OTEL as part of Fosite. While this is valuable, this should
be provided as a wrapper and not as a hard wired part of Fosite, which is meant to be a SDK. Also,
popular instrumentation options and APM vendors have some level of support for OTEL but shine
when their wrapper SDKs are used that do not always comply with OTEL interfaces. See New Relic
and Instana SDKs for reference.
This change proposes that OTEL should be an opt-in as part of a wrapper implementation of Fosite
that is called
InstrumentedFosite
under theotel
package. It also offers a pattern that can be appliedto any code blocks and handlers that should be instrumented to derive maximum benefits from a telemetry
perspective. For example - there may be no value in instrumenting a code block that interfaces with no
external components beyond the overall telemetry offered at a HTTP middleware level, whereas there
may be a great deal of value instrumenting call outs to external APIs and databases.
Related Issue or Design Document
#761
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
Further comments