# Temporality configuration setup is not working for the OpenTelemetry Spring Boot starter

**URL:** <https://community.dynatrace.com/t/temporality-configuration-setup-is-not-working-for-the-opentelemetry-spring-boot-starter/52557>\
**Category:** OpenTelemetry\
**Tags:** opentelemetry\
**Created:** [July 19, 2025, 4:16pm UTC](https://community.dynatrace.com/t/temporality-configuration-setup-is-not-working-for-the-opentelemetry-spring-boot-starter/52557 "2025-07-19T16:16:44Z")\
**Posts on this page:** 2\
**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:** [July 19, 2025, 4:16pm UTC](https://community.dynatrace.com/t/temporality-configuration-setup-is-not-working-for-the-opentelemetry-spring-boot-starter/52557/1 "2025-07-19T16:16:44Z")

</div>

Hi,

I’ve successfully integrated the OpenTelemetry Spring Boot Starter with my Java application, and everything is working smoothly.

Now, I’m exploring how to change the metrics’ temporality to _Delta_. So far, I’ve attempted the following configuration steps:

1. Using application.yml

```auto
otel:
  service:
    name: my-service
  logs:
    exporter: none
  propagators: tracecontext
  exporter:
    otlp:
      protocol: http/protobuf
      traces:
        endpoint: https://base/api/v2/otlp/v1/traces
        exporter:
          interval: 60000
      metrics:
        endpoint: https://base/api/v2/otlp/v1/metrics
        aggregation_temporality:
          counter: delta # or delta
        # histogram: delta
        # observable_gauge: cumulative
        exporter:
          interval: 60000
        enabled: true
      headers: Authorization=Api-Token token

```

2. Using env variable

```auto
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE

```

Unfortunately, none of the approaches I’ve tried so far have worked. Has anyone encountered a similar issue or found a working solution?

Any guidance would be greatly appreciated—thank you!

---

<div class="post-metadata">

**Author:** ![joaograssi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/joaograssi/32/38779_2.png) [@joaograssi](https://community.dynatrace.com/u/joaograssi)\
**Post date:** [July 24, 2025, 3:01pm UTC](https://community.dynatrace.com/t/temporality-configuration-setup-is-not-working-for-the-opentelemetry-spring-boot-starter/52557/2 "2025-07-24T15:01:36Z")

</div>

The&nbsp;application.yaml from Spring Boot follows the same property names as for the application.properties one.

For the latter, the temporality can be specified as:

```auto
otel.exporter.otlp.metrics.temporality.preference=DELTA

```

So, if using the YAML variant, you can do:

```markup
otel:
  service:
    name: my-service
  exporter:
    otlp:
      metrics:
        temporality:
          preference: DELTA

```

Also, to make the config smaller, if you are sending all telemetry types Dynatrace (traces, metrics and logs) you can shorten the config by using the top-level endpoint property. Like so:

```markup
otel:
  service:
    name: my-service
  exporter:
    otlp:
      protocol: http/protobuf
      endpoint: https://{environmentid}.live.dynatrace.com/api/v2/otlp
      headers: Authorization=Api-Token token
      metrics:
        temporality:
          preference: DELTA

```

For a full view of the SDK configuration, see: [SDK configuration | OpenTelemetry](https://opentelemetry.io/docs/zero-code/java/spring-boot-starter/sdk-configuration/)
