# OpenTelemetry and new metric dimension

**URL:** <https://community.dynatrace.com/t/opentelemetry-and-new-metric-dimension/49910>\
**Category:** OpenTelemetry\
**Tags:** dynatrace-managed, opentelemetry\
**Created:** [January 24, 2025, 3:08pm UTC](https://community.dynatrace.com/t/opentelemetry-and-new-metric-dimension/49910 "2025-01-24T15:08:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkaszub](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mkaszub](https://community.dynatrace.com/u/mkaszub)\
**Post date:** [January 24, 2025, 3:08pm UTC](https://community.dynatrace.com/t/opentelemetry-and-new-metric-dimension/49910/1 "2025-01-24T15:08:45Z")

</div>

Hi,

After some time, I decided to add a new dimension (tag) to my metric. However, it appears that Dynatrace is not recognizing it. I can’t see the new dimension when attempting to split the metric or in the metric details where all dimensions are listed. For testing purposes, I created an identical metric with a different name, and the additional dimension is visible there. This suggests there might be a caching issue or that the metric definition hasn’t been updated.

I haven’t found a way to remove the OpenTelemetry metric. What are my options for adding the new dimension to the metric without changing its name?

Regards,  
Marcin

---

<div class="post-metadata">

**Author:** ![mizso74](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [January 26, 2025, 6:15pm UTC](https://community.dynatrace.com/t/opentelemetry-and-new-metric-dimension/49910/2 "2025-01-26T18:15:56Z")

</div>

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

I am not an OTEL expert but, have you checked these domcumentaion topics:

[Configure OpenTelemetry metrics ingest — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/opentelemetry/getting-started/metrics/configuration#configure-opentelemetry-metrics-ingest)

[OpenTelemetry metrics limitations — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/opentelemetry/getting-started/metrics/limitations)

I hope it helps.

Best regards,

János

---

<div class="post-metadata">

**Author:** ![RohitBisht](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rohitbisht/32/38577_2.png) [@RohitBisht](https://community.dynatrace.com/u/RohitBisht)\
**Post date:** [January 28, 2025, 1:45am UTC](https://community.dynatrace.com/t/opentelemetry-and-new-metric-dimension/49910/3 "2025-01-28T01:45:30Z")

</div>

Hi&nbsp;[@mkaszub](https://community.dynatrace.com/user/85854)&nbsp;,  
Here are few things you can check.  
1. Protocol and syntax for dimension: Check if it is following this:&nbsp;[Metric ingestion protocol — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/metric-ingestion-protocol)&nbsp;  
2. Test using API and send dummy values onto the metric using that dimension.&nbsp;[Metrics API v2 — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/api-metrics-v2)

If point 2 works, maybe there is something wrong with the otel code sending data.

---

<div class="post-metadata">

**Author:** ![gopher](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gopher/32/5728_2.png) [@gopher](https://community.dynatrace.com/u/gopher)\
**Post date:** [January 28, 2025, 12:17pm UTC](https://community.dynatrace.com/t/opentelemetry-and-new-metric-dimension/49910/4 "2025-01-28T12:17:48Z")

</div>

Hi&nbsp;[mkaszub](https://community.dynatrace.com/user/85854),

I haven’t had any issues adding / removing - example of our processors below.&nbsp;  
On changing them (adding too or deleting), The only way I could replicate what you are seeing is by looking within the same time window.&nbsp; &nbsp;after the time window has passed for the last metric captured it won’t be shown.

```markup
processors:
    attributes:
      actions:
      - key: k8s.cluster.name
        value: 'my cluster name'
        action: insert          
    cumulativetodelta: {}      
    filter:
      metrics:
        exclude:
          match_type: expr
          expressions:
          - MetricType == "Summary"
    memory_limiter:
      check_interval: 5s
      limit_percentage: 80
      spike_limit_percentage: 25
    batch/traces:
      send_batch_size: 5000
      send_batch_max_size: 5000
      timeout: 60s
    batch/metrics:
      send_batch_size: 3000
      send_batch_max_size: 3000
      timeout: 60s
    batch/logs:
      send_batch_size: 1800
      send_batch_max_size: 2000
      timeout: 60s      
    k8sattributes:
      auth_type: serviceAccount
      passthrough: false      
      extract:
        metadata:
        - k8s.pod.name
        - k8s.pod.uid
        - k8s.deployment.name
        - k8s.statefulset.name
        - k8s.daemonset.name
        - k8s.cronjob.name
        - k8s.namespace.name
        - k8s.node.name
        - k8s.cluster.uid
      pod_association:
      - sources:
        - from: resource_attribute
          name: k8s.pod.name
        - from: resource_attribute
          name: k8s.namespace.name
      - sources:
        - from: resource_attribute
          name: k8s.pod.ip
      - sources:
        - from: resource_attribute
          name: k8s.pod.uid
      - sources:
        - from: connection
    transform:
      error_mode: ignore
      trace_statements:
        - context: resource
          statements:
              - set(attributes["dt.kubernetes.workload.kind"], "statefulset") where IsString(attributes["k8s.statefulset.name"])
              - set(attributes["dt.kubernetes.workload.name"], attributes["k8s.statefulset.name"]) where IsString(attributes["k8s.statefulset.name"])
              - set(attributes["dt.kubernetes.workload.kind"], "deployment") where IsString(attributes["k8s.deployment.name"])
              - set(attributes["dt.kubernetes.workload.name"], attributes["k8s.deployment.name"]) where IsString(attributes["k8s.deployment.name"])
              - set(attributes["dt.kubernetes.workload.kind"], "daemonset") where IsString(attributes["k8s.daemonset.name"])
              - set(attributes["dt.kubernetes.workload.name"], attributes["k8s.daemonset.name"]) where IsString(attributes["k8s.daemonset.name"])
              - set(attributes["dt.kubernetes.cluster.id"], attributes["k8s.cluster.uid"]) where IsString(attributes["k8s.cluster.uid"])
      log_statements:
        - context: resource
          statements:
              - set(attributes["dt.kubernetes.workload.kind"], "statefulset") where IsString(attributes["k8s.statefulset.name"])
              - set(attributes["dt.kubernetes.workload.name"], attributes["k8s.statefulset.name"]) where IsString(attributes["k8s.statefulset.name"])
              - set(attributes["dt.kubernetes.workload.kind"], "deployment") where IsString(attributes["k8s.deployment.name"])
              - set(attributes["dt.kubernetes.workload.name"], attributes["k8s.deployment.name"]) where IsString(attributes["k8s.deployment.name"])
              - set(attributes["dt.kubernetes.workload.kind"], "daemonset") where IsString(attributes["k8s.daemonset.name"])
              - set(attributes["dt.kubernetes.workload.name"], attributes["k8s.daemonset.name"]) where IsString(attributes["k8s.daemonset.name"])
              - set(attributes["dt.kubernetes.cluster.id"], attributes["k8s.cluster.uid"]) where IsString(attributes["k8s.cluster.uid"])

```
