Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.4.5 to 1.4.6. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/qos-ch/logback/commits">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
agent | ||
bootstrap | ||
custom | ||
gradle | ||
instrumentation | ||
smoke-tests | ||
testing/agent-for-testing | ||
README.md | ||
build.gradle | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
settings.gradle |
README.md
Distro
Introduction
This repository serves as a collection of examples of extending functionality of OpenTelemetry Java instrumentation agent. It demonstrates how to repackage the aforementioned agent adding custom functionality. For every extension point provided by OpenTelemetry Java instrumentation, this repository contains an example of its usage.
General structure
This repository has four main submodules:
custom
contains all custom functionality, SPI and other extensionsagent
contains the main repackaging functionality and, optionally, an entry point to the agent, if one wishes to customize thatinstrumentation
contains custom instrumentations added by vendorsmoke-tests
contains simple tests to verify that resulting agent builds and applies correctly
Extensions examples
- DemoIdGenerator - custom
IdGenerator
- DemoPropagator - custom
TextMapPropagator
- DemoSampler - custom
Sampler
- DemoSpanProcessor - custom
SpanProcessor
- DemoSpanExporter - custom
SpanExporter
- DemoServlet3InstrumentationModule - additional instrumentation
Instrumentation customisation
There are several options to override or customise instrumentation provided by the upstream agent. The following description follows one specific use-case:
Instrumentation X from Otel distribution creates span that I don't like and I want to change it in my vendor distro.
As an example, let us take some database client instrumentation that creates a span for database call and extracts data from db connection to provide attributes for that span.
I don't want this span at all
The easiest case. You can just pre-configure your distribution and disable given instrumentation.
I want to add/modify some attributes and their values does NOT depend on a specific db connection instance
E.g. you want to add some data from call stack as span attribute.
In this case just provide your custom SpanProcessor
.
No need for touching instrumentation itself.
I want to add/modify some attributes and their values depend on a specific db connection instance
Write a new instrumentation which injects its own advice into the same method as the original one.
Use getOrder
method to ensure it is run after the original instrumentation.
Now you can augment current span with new information.
See DemoServlet3Instrumentation.
I want to remove some attributes
Write custom exporter or use attribute filtering functionality in Collector.
I don't like Otel span at all. I want to significantly modify it and its lifecycle
Disable existing instrumentation.
Write a new one, which injects Advice
into the same (or better) method as the original instrumentation.
Write your own Advice
for this.
Use existing Tracer
directly or extend it.
As you have your own Advice
, you can control which Tracer
you use.