How to Customize Transaction Name with OpenTelemetry Java Agent #12566
Replies: 1 comment
-
I tried adding public class DynamicSpanProcessor implements SpanProcessor { and initialized while starting server DynamicSpanProcessor dynamicSpanProcessor = new DynamicSpanProcessor(); But, onStart is not getting invoked |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I’m using the OpenTelemetry Java agent for instrumentation and I’m trying to customize the transaction names for my spans. Currently, the transaction name is displayed as 'GET /app-web/*.do', but I need it to be more specific, like 'GET /app-web/manager/order.do?subActionName=createOrder'.
Here is an example of the log output I’m seeing:
How can I customize the transaction name to include the full path and query parameters?
Is there a way to dynamically set the span name based on the request details using the OpenTelemetry Java agent?
Are there any examples or best practices for achieving this?
Any help or guidance would be greatly appreciated!
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions