# Router v2.x configuration for exporters.metrics.common.attributes does not work on v2.x

**URL:** <https://community.apollographql.com/t/router-v2-x-configuration-for-exporters-metrics-common-attributes-does-not-work-on-v2-x/8691>\
**Category:** Router\
**Tags:** federation\
**Created:** [March 7, 2025, 7:49am UTC](https://community.apollographql.com/t/router-v2-x-configuration-for-exporters-metrics-common-attributes-does-not-work-on-v2-x/8691 "2025-03-07T07:49:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![juancarlosjr97](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/juancarlosjr97/32/1517_2.png) [@juancarlosjr97](https://community.apollographql.com/u/juancarlosjr97)\
**Post date:** [March 7, 2025, 7:49am UTC](https://community.apollographql.com/t/router-v2-x-configuration-for-exporters-metrics-common-attributes-does-not-work-on-v2-x/8691/1 "2025-03-07T07:49:48Z")

</div>

We are starting to roll out Apollo Router v2.x. We followed the migration guide from [Release v2.0.0 · apollographql/router · GitHub](https://github.com/apollographql/router/releases/tag/v2.0.0) and we ran the migration script for the `router.yaml` and the script did not pick up anything (besides removing comments).

We noticed that running Router, fails due to a `exporters.metrics.common.attributes` we have in place for v1.x that exports custom metrics for our observability.

The error is ` Failed to read configuration: configuration had errors:

1. at line 120…Additional properties are not allowed (‘attributes’ was unexpected)`

Our Router Configuration has the following:

 ![Screenshot 2025-03-06 at 9.28.17 am](https://us1.discourse-cdn.com/flex019/uploads/apollographql/original/2X/c/ca2b16da638e5e1ea08f62fbb738fabd0a19ec21.png)

How would be able to update the router configuration to achieve the same?

P.S.: We read this section [Upgrading from Versions 1.x - Apollo GraphQL Docs](https://www.apollographql.com/docs/graphos/reference/upgrade/from-router-v1#emitting-custom-metrics) but unclear.

---

<div class="post-metadata">

**Author:** ![shanemyrick](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/shanemyrick/32/5474_2.png) [@shanemyrick](https://community.apollographql.com/u/shanemyrick)\
**Post date:** [March 12, 2025, 6:25pm UTC](https://community.apollographql.com/t/router-v2-x-configuration-for-exporters-metrics-common-attributes-does-not-work-on-v2-x/8691/2 "2025-03-12T18:25:56Z")

</div>

Hey @juancarlosjr97, thank you for finding and reporting this issue. It does appear that this section was removed from 1.x to 2.x. We can update the guide to help others.

Going forward static attributes should be added as resources and dynamic attributes should be configured under the `instruments` section

```yaml
telemetry:
  exporters:
    metrics:
      common: 
        resource:
          env_full_name: deployment_env

```

---

<div class="post-metadata">

**Author:** ![shanemyrick](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/shanemyrick/32/5474_2.png) [@shanemyrick](https://community.apollographql.com/u/shanemyrick)\
**Post date:** [March 12, 2025, 6:33pm UTC](https://community.apollographql.com/t/router-v2-x-configuration-for-exporters-metrics-common-attributes-does-not-work-on-v2-x/8691/3 "2025-03-12T18:33:25Z")

</div>

I made a docs PR: [Update from-router-v1 guide for custom metrics attributes by smyrick · Pull Request #6993 · apollographql/router · GitHub](https://github.com/apollographql/router/pull/6993)

---

<div class="post-metadata">

**Author:** ![juancarlosjr97](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/juancarlosjr97/32/1517_2.png) [@juancarlosjr97](https://community.apollographql.com/u/juancarlosjr97)\
**Post date:** [March 17, 2025, 11:04am UTC](https://community.apollographql.com/t/router-v2-x-configuration-for-exporters-metrics-common-attributes-does-not-work-on-v2-x/8691/4 "2025-03-17T11:04:48Z")

</div>

Hey Shane, unfortunately, the new metrics are not showing the custom tags attached to the metric as per the router configuration. I am wondering if there might be something else missing from the configuration.

---

<div class="post-metadata">

**Author:** ![shanemyrick](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/shanemyrick/32/5474_2.png) [@shanemyrick](https://community.apollographql.com/u/shanemyrick)\
**Post date:** [March 17, 2025, 10:01pm UTC](https://community.apollographql.com/t/router-v2-x-configuration-for-exporters-metrics-common-attributes-does-not-work-on-v2-x/8691/5 "2025-03-17T22:01:50Z")

</div>

If you have a bug and can reproduce the issue, please open a support ticket through your GraphOS account: [https://support.apollographql.com/](https://support.apollographql.com/)
