Skip to content

Servlet 5 library instrumentation#16033

Merged
trask merged 2 commits intoopen-telemetry:mainfrom
laurit:servlet5-library
Jan 28, 2026
Merged

Servlet 5 library instrumentation#16033
trask merged 2 commits intoopen-telemetry:mainfrom
laurit:servlet5-library

Conversation

@laurit
Copy link
Copy Markdown
Contributor

@laurit laurit commented Jan 28, 2026

Adds library instrumentation for servlet 5 similarly to what was done for servlet 3 in #15473

@laurit laurit requested a review from a team as a code owner January 28, 2026 13:00
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.instrumentation.servlet.v5_0.internal;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this and other library instrumentation classes are copied from servlet 3 instrumentation with servlet api types changed from javax to jakarta

import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;

public abstract class AbstractTomcatServlet5Test extends AbstractServlet5Test<Tomcat, Context> {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to tests are also copied from servlet 3. Tests are rearranged to use more @ParameterizedClass which lets us share more code between agent and library instrumentation tests.

### Add these dependencies to your project

Replace `OPENTELEMETRY_VERSION` with
the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-servlet-5.0).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i found it interesting that there were already really old artifacts of this available:

image

Comment thread instrumentation/servlet/servlet-5.0/library/README.md Outdated
@trask trask merged commit 3bc7891 into open-telemetry:main Jan 28, 2026
85 checks passed
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.

3 participants