opentelemetry-java-instrume.../examples/distro
dependabot[bot] d087d0d0d1
Bump mockito-core from 4.10.0 to 4.11.0 in /examples/distro (#7482)
Bumps [mockito-core](https://github.com/mockito/mockito) from 4.10.0 to
4.11.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mockito/mockito/releases">mockito-core's
releases</a>.</em></p>
<blockquote>
<h2>v4.11.0</h2>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><em>Changelog
generated by <a
href="https://github.com/shipkit/shipkit-changelog">Shipkit Changelog
Gradle Plugin</a></em><!-- raw HTML omitted --><!-- raw HTML omitted
--></p>
<h4>4.11.0</h4>
<ul>
<li>2022-12-28 - <a
href="https://github.com/mockito/mockito/compare/v4.10.0...v4.11.0">1
commit(s)</a> by Andy Coates</li>
<li>Improve vararg handling: approach 2 [(<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2807">#2807</a>)](<a
href="https://github-redirect.dependabot.com/mockito/mockito/pull/2807">mockito/mockito#2807</a>)</li>
<li>Mocking varargs method with <code>any(String[].class)</code> doesn't
work as expected [(<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2796">#2796</a>)](<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2796">mockito/mockito#2796</a>)</li>
<li>(Argument)Matchers regression from 1.10.19 to 2.18.3 for varargs
[(<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/1498">#1498</a>)](<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/1498">mockito/mockito#1498</a>)</li>
<li>Cannot verify varargs parameter as an array [(<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/1222">#1222</a>)](<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/1222">mockito/mockito#1222</a>)</li>
<li>ArgumentCaptor can't capture varargs-arrays [(<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/584">#584</a>)](<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/584">mockito/mockito#584</a>)</li>
<li>Verification of an empty varargs call fails when isNotNull() is used
[(<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/567">#567</a>)](<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/567">mockito/mockito#567</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="483e15f9f9"><code>483e15f</code></a>
Add <code>type()</code> method to <code>ArgumentMatcher</code> (<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2807">#2807</a>)</li>
<li>See full diff in <a
href="https://github.com/mockito/mockito/compare/v4.10.0...v4.11.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.mockito:mockito-core&package-manager=gradle&previous-version=4.10.0&new-version=4.11.0)](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>
2022-12-29 10:22:13 +00:00
..
agent Upgrade to otel java 1.19.0 (#6757) 2022-10-12 09:19:37 -07:00
bootstrap Improve sample distro (#6531) 2022-09-02 12:40:29 +02:00
custom Improve sample distro (#6531) 2022-09-02 12:40:29 +02:00
gradle Stop relocating :instrumentation:resources:library (#7136) 2022-11-15 22:37:17 +00:00
instrumentation Bump jetty-servlet from 8.0.0.v20110901 to 8.2.0.v20160908 in /examples/distro (#7113) 2022-11-08 23:20:27 +00:00
smoke-tests Bump protobuf-java-util from 3.21.11 to 3.21.12 in /examples/distro (#7425) 2022-12-15 08:23:25 -08:00
testing/agent-for-testing Upgrade to otel java 1.19.0 (#6757) 2022-10-12 09:19:37 -07:00
README.md Introduce markdown lint check (#7175) 2022-11-16 20:48:42 -08:00
build.gradle Bump mockito-core from 4.10.0 to 4.11.0 in /examples/distro (#7482) 2022-12-29 10:22:13 +00:00
gradle.properties Run Gradle and compile code with Java 17 (#5623) 2022-03-18 15:38:51 -07:00
gradlew Update gradle to 7.5.1 (#6359) 2022-08-12 12:03:43 +02:00
gradlew.bat Update gradle to 7.5.1 (#6359) 2022-08-12 12:03:43 +02:00
settings.gradle Improve sample distro (#6531) 2022-09-02 12:40:29 +02:00

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 extensions
  • agent contains the main repackaging functionality and, optionally, an entry point to the agent, if one wishes to customize that
  • instrumentation contains custom instrumentations added by vendor
  • smoke-tests contains simple tests to verify that resulting agent builds and applies correctly

Extensions examples

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.