Hello,
We are working on a repo which doesn’t have any RestAPI.
Could you suggest how we can get dt.trace_id, dt.span_id in logs using auto instrumentation (oneAgent)
Sample code:
@Scheduled (
timeUnit = TimeUnit.SECONDS,
fixedRateString = “#{@SchedulerProperties.syncLifecycleJobStatusInSeconds }”,
initialDelayString = “#{@SchedulerProperties.syncLifecycleJobStatusInitialDelayInSeconds }”)
public void sampleScheduler() {
schedulerUtils.executeService(
SchedulerServices.JOB_STATUS,
lifecycleJobStatusService::processLifecycleJobStatus);
}
Thanks in advance.
sia_h
December 26, 2024, 1:00pm
2
You may be able to use custom services. This allows you to monitor scheduled tasks and other non-REST methods. Please check the custom services documentation .
Hi @sivakumarp
You have an option to instrument the highlighted app through the attached references, it depends on the app technology:
Custom services:
Hoping it adds value.
BR,
Peter
Hi Sia_h,
Thanks for the response.
We have tried adding custom service,
Q1. Will it enable auto instrumentation automatically?
Q2. Will it enable for all other classes also?
sia_h
December 27, 2024, 12:23pm
5
Since this appears to be Java code, you’ll need to restart your application process for the instrumentation to take effect.
Only the classes and methods you have chosen for instrumentation. You can restrict it to certain process groups.