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

**URL:** <https://community.dynatrace.com/t/is-it-possible-to-auto-instrument-our-application-which-doesnt-have-any-rest-apis/49496>\
**Category:** Logs\
**Tags:** oneagent, logs\
**Created:** [December 26, 2024, 11:13am UTC](https://community.dynatrace.com/t/is-it-possible-to-auto-instrument-our-application-which-doesnt-have-any-rest-apis/49496 "2024-12-26T11:13:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivakumarp](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@sivakumarp](https://community.dynatrace.com/u/sivakumarp)\
**Post date:** [December 26, 2024, 11:13am UTC](https://community.dynatrace.com/t/is-it-possible-to-auto-instrument-our-application-which-doesnt-have-any-rest-apis/49496/1 "2024-12-26T11:13:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sia\_h](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@sia\_h](https://community.dynatrace.com/u/sia_h)\
**Post date:** [December 26, 2024, 1:00pm UTC](https://community.dynatrace.com/t/is-it-possible-to-auto-instrument-our-application-which-doesnt-have-any-rest-apis/49496/2 "2024-12-26T13:00:23Z")

</div>

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](https://docs.dynatrace.com/docs/observe/applications-and-microservices/services/service-detection-and-naming/service-types/custom-services).

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [December 26, 2024, 5:14pm UTC](https://community.dynatrace.com/t/is-it-possible-to-auto-instrument-our-application-which-doesnt-have-any-rest-apis/49496/3 "2024-12-26T17:14:42Z")

</div>

Hi&nbsp;[@sivakumarp](https://community.dynatrace.com/user/84796)

You have an option to instrument the highlighted app through the attached references, it depends on the app technology:

- [Instrument your application using Dynatrace OpenKit — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/extend-dynatrace/openkit/instrument-your-application-using-dynatrace-openkit)
- [Initial setup for custom applications in RUM Classic — Dynatrace Docs](https://docs.dynatrace.com/docs/observe/digital-experience/custom-applications/custom-rum-initial-setup)
- [Custom applications in RUM Classic — Dynatrace Docs](https://docs.dynatrace.com/docs/observe/digital-experience/custom-applications)

Custom services:

- [Define custom services — Dynatrace Docs](https://docs.dynatrace.com/docs/observe/applications-and-microservices/services/service-detection-and-naming/service-types/custom-services)
- [Custom messaging services — Dynatrace Docs](https://docs.dynatrace.com/docs/observe/applications-and-microservices/services/service-detection-and-naming/service-types/define-messaging-services)

Hoping it adds value.

BR,

Peter

---

<div class="post-metadata">

**Author:** ![sivakumarp](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@sivakumarp](https://community.dynatrace.com/u/sivakumarp)\
**Post date:** [December 27, 2024, 12:07pm UTC](https://community.dynatrace.com/t/is-it-possible-to-auto-instrument-our-application-which-doesnt-have-any-rest-apis/49496/4 "2024-12-27T12:07:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sia\_h](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@sia\_h](https://community.dynatrace.com/u/sia_h)\
**Post date:** [December 27, 2024, 12:23pm UTC](https://community.dynatrace.com/t/is-it-possible-to-auto-instrument-our-application-which-doesnt-have-any-rest-apis/49496/5 "2024-12-27T12:23:14Z")

</div>

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.](https://docs.dynatrace.com/docs/shortlink/custom-services#restrict)
