cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to auto instrument our application which doesn't have any Rest Apis

sivakumarp
Visitor

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.

4 REPLIES 4

sia_h
Dynatrace Champion
Dynatrace Champion

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 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
Dynatrace Champion
Dynatrace Champion

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.

Featured Posts