open-telemetry / open-telemetry/opentelemetry-java-instrumentation

Perf issue about tomcat plugin

Open
#13,084 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
2.6k
Forks
1.2k
Avg merge
2d 18h
Merged PRs (30d)
228

Description

In tomcat plugin, we will invoke messageBytesToString method for multiple times. Each invocation costs around 0.06% CPU.

Image

Do we have to instrument org.apache.catalina.connector.CoyoteAdapter#service method? We might be able to avoid frequent ·messageBytesToString· operations by instrumenting org.apache.catalina.core.StandardHostValve#invoke

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the Tomcat instrumentation around org.apache.catalina.connector.CoyoteAdapter#service and org.apache.catalina.core.StandardHostValve#invoke, focusing on repeated messageBytesToString calls. Measure the candidate approach and define done as preserving the required instrumentation while avoiding unnecessary repeated conversions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.