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

We are starting to roll out Apollo Router v2.x. We followed the migration guide from Release v2.0.0 · apollographql/router · GitHub 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:

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 but unclear.

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

telemetry:
  exporters:
    metrics:
      common: 
        resource:
          env_full_name: deployment_env
1 Like

I made a docs PR: Update from-router-v1 guide for custom metrics attributes by smyrick · Pull Request #6993 · apollographql/router · GitHub

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.

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