-
Notifications
You must be signed in to change notification settings - Fork 13
Description
- We have JAVA app that is auto instrumented with OneAgent. We have some background JOBS (Currently showing under Requests executed in background thread) for which we need to give trace name and attributes so that it come under pure paths and it is named suitable for tracking various background activities.
My background job can either be a scheduled CRON or a process triggered out of message consumption from queue.
My background job has a flow like below:
Background job -> Inter service call to other java microservice / RMQ message / DB calls -> job ends
Question: With the above flow in mind, If I start a trace with OTEL, will those inter service calls / RMQ / DB be auto-instrumented with OneAgent or OTEL has to take care of it since it started the trace?
In case the RMQ publish was triggered by a auto instrumented HTTP request and I name a span before / after publish with OTEL, is the entire auto instrumentation for the HTTP request lost?
- Custom attributes are supported at SDK object level
OneAgentSDK oneAgentSdk = OneAgentSDKFactory.createInstance(); IncomingMessageProcessTracer incomingMessageProcessTracer = oneAgentSdk.traceIncomingMessageProcess(MessagingSystemInfoNoop.INSTANCE); incomingMessageProcessTracer.start(); oneAgentSdk.addCustomRequestAttribute("requestId", amqpMessage.getRequestId());
Question: In a multi threaded world, do we need to create OneAgentSDK object once per request so that addCustomRequestAttribute is thread safe or dyna trace handles addCustomRequestAttribute for multiple threads automatically with a single instance?
- Even for the auto instrumented cases, I have few areas where i specifically need to add extra attributes / track a DB statement in a detailed way, etc . to have more developer oriented info. Need to have the best of both worlds of OTEL / OneAgent here. What is the best suggested approach.