# Is there a concept similar to \`application\_packages\` in \`Elastic Distribution of OpenTelemetry Java\`?

**URL:** <https://discuss.elastic.co/t/is-there-a-concept-similar-to-application-packages-in-elastic-distribution-of-opentelemetry-java/365914>\
**Category:** APM\
**Tags:** java\
**Created:** [September 2, 2024, 4:28pm UTC](https://discuss.elastic.co/t/is-there-a-concept-similar-to-application-packages-in-elastic-distribution-of-opentelemetry-java/365914 "2024-09-02T16:28:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![linghengqian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/linghengqian/32/103651_2.png) [@linghengqian](https://discuss.elastic.co/u/linghengqian)\
**Post date:** [September 2, 2024, 4:28pm UTC](https://discuss.elastic.co/t/is-there-a-concept-similar-to-application-packages-in-elastic-distribution-of-opentelemetry-java/365914/1 "2024-09-02T16:28:15Z")

</div>

- I would like to know if there is a concept similar to `application_packages` in `Elastic Distribution of OpenTelemetry Java`?
- When I test the Spring Boot application locally through `Elastic APM Java Agent`, I have operations similar to the following:

```shell
sdk use java 22.0.2-graalce
./mvnw clean dependency:get -Dartifact=co.elastic.apm:elastic-apm-agent:1.51.0
./mvnw clean spring-boot:run \
  -Dspring-boot.run.agents="$HOME/.m2/repository/co/elastic/apm/elastic-apm-agent/1.51.0/elastic-apm-agent-1.51.0.jar" \
  -Dspring-boot.run.jvmArguments="\
  -Delastic.apm.service_name='smoke-tests' \
  -Delastic.apm.server_url='http://localhost:8200' \
  -Delastic.apm.application_packages='io.github.linghengqian.smoke.tests'\
  "

```

- But it looks like [GitHub - elastic/elastic-otel-java](https://github.com/elastic/elastic-otel-java) doesn't have an environment variable or system property like `elastic.apm.application_packages`? Is this expected behavior? This is how I tested the `Elastic Distribution of OpenTelemetry Java`:

```shell
sdk use java 22.0.2-graalce
./mvnw clean dependency:get -Dartifact=co.elastic.otel:elastic-otel-javaagent:1.0.0
./mvnw clean spring-boot:run \
  -Dspring-boot.run.agents="$HOME/.m2/repository/co/elastic/otel/elastic-otel-javaagent/1.0.0/elastic-otel-javaagent-1.0.0.jar" \
  -Dspring-boot.run.jvmArguments="\
  -Dotel.exporter.otlp.endpoint='http://localhost:8200' \
  -Dotel.resource.attributes='service.name=2-smoke-tests'\
  "

```

- I don't think this requires any reproducible git, because at this point the `Elastic Distribution of OpenTelemetry Java` is instrumenting `io.opentelemetry.apache-httpclient-5.0` .
- ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/8/98312072907cd9116f5de24d7f13ecbe0818ce1a.png)
- In contrast, for the same Spring Boot application, the framework monitored by the `Elastic APM Java Agent` is `Spring Web MVC`.
- ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/2/629d9dd62cb4b46960687992c65fafc383446641.png)
- Something like the `elastic.apm.application_packages` system property for the `Elastic APM Java Agent` does seem to work. But I can't find an equivalent for the `Elastic Distribution of OpenTelemetry Java`.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 2, 2024, 6:10pm UTC](https://discuss.elastic.co/t/is-there-a-concept-similar-to-application-packages-in-elastic-distribution-of-opentelemetry-java/365914/2 "2024-09-02T18:10:46Z")

</div>

Hi @linghengqian

Perhaps this.

`otel.javaagent.exclude-classes`

I was just looking around, let us know if it works..

> <https://github.com/malafeev/opentelemetry-auto-instr-java/blob/master/docs/suppressing-instrumentation.md>

EDIT / UPDATE : As @Jack_Shirazi said below

> [@Jack\_Shirazi](#):
>
> None of this is related to `application_package`

@linghengqian When I saw this topic I thought you were trying to include / exclude packages

[`application_packages`](https://www.elastic.co/guide/en/apm/agent/java/current/config-stacktrace.html#config-application-packages)

Apologies for any confusion...

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [September 2, 2024, 6:22pm UTC](https://discuss.elastic.co/t/is-there-a-concept-similar-to-application-packages-in-elastic-distribution-of-opentelemetry-java/365914/3 "2024-09-02T18:22:10Z")

</div>

I think you are referring to the "Framework" description in the dropdown about the service from the Java icon. This gets set by the `service.framework.name` attribute which the agent generates from the instrumentation. The `Elastic APM Java Agent` has carefully assigned names for these values which are different and more readably descriptive than the name of the instrumentation (here `spring-mvc`) that generates the traces.

The `Elastic Distribution of OpenTelemetry Java` (EDOT Java) uses the logic of the upstream OpenTelemetry Java agent, which doesn't have equivalent readably descriptive naming for instrumentations, which means only the instrumentation name itself can be shown.

None of this is related to `application_packages`.

So for now, there is no mechanism to display a nicer descriptive name in the "Framework" when using the EDOT Java agent. I've opened an [enhancement request](https://github.com/elastic/elastic-otel-java/issues/395) for this

---

<div class="post-metadata">

**Author:** ![linghengqian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/linghengqian/32/103651_2.png) [@linghengqian](https://discuss.elastic.co/u/linghengqian)\
**Post date:** [September 3, 2024, 12:44am UTC](https://discuss.elastic.co/t/is-there-a-concept-similar-to-application-packages-in-elastic-distribution-of-opentelemetry-java/365914/4 "2024-09-03T00:44:06Z")

</div>

- @Jack_Shirazi Thanks, that's exactly what I was looking for.

- For `application_packages`, I just found out that a corresponding issue already exists at [[Config] Add Application Packages · Issue #303 · elastic/elastic-otel-java · GitHub](https://github.com/elastic/elastic-otel-java/issues/303) . Without `application_packages`, it seems that starting `Elastic Distribution of OpenTelemetry Java` is slower than `Elastic APM Java Agent`.

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [September 3, 2024, 9:03am UTC](https://discuss.elastic.co/t/is-there-a-concept-similar-to-application-packages-in-elastic-distribution-of-opentelemetry-java/365914/5 "2024-09-03T09:03:42Z")

</div>

The `Elastic APM Java Agent` startup time can be improved a [number of ways](https://www.elastic.co/guide/en/apm/agent/java/current/tuning-and-overhead.html#tuning-agent-startup). The EDOT Java agent doesn't (yet) have as much flexibility. The referred to [issue](https://github.com/elastic/elastic-otel-java/issues/303) will not improve startup time, it will only improve display of traces in the trace waterfall diagram
