elastic / elastic/apm-agent-java

Support Spring non-web services

Open
#1,225 5 comments 0 reactions 0 assignees View on GitHub
instrumentation new-feature
Dominant language
Java
Stars
594
Forks
338
Avg merge
1d 13h
Merged PRs (30d)
25

Description

## Is your feature request related to a problem?
I have some simple Spring Boot 2.1.x through 2.3.x applications that get messages from queues and process these using back-end services shared with other systems. These simple applications do not need a web server and are configured with:
`spring.main.web-application-type=none`

Attaching the Elastic APM Java Agent to these causes a:
`java.lang.IllegalStateException: Cannot resolve type description for javax.servlet.ServletContext`

## Describe the solution you'd like
I would like to be able to monitor these systems as I currently do for Spring Boot Servlet applications. They would likely initiate their own Traces since they're processing messages asynchronously.

## Describe alternatives you've considered
I could configure these as Servlet applications but that would defeat the purpose of keeping them small and light and would require more runtime resources, increasing the cost of operating them.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.