Router v2 configuration (telemetry)

Hello,

I am trying to upgrade to router v2 but I am not sure how to upgrade my config, the guide is not clear enough.

This is my current v1 configuration:

telemetry:
  # Configuration to send traces and metrics to an OpenTelemetry Protocol compatible service
  exporters:
    metrics:
      common:
        service_name: "router"
        attributes:
          supergraph:
            request:
              header:
              - named: 'apollographql-client-name'
                rename: 'client_name'
            static:
            # Always apply this attribute to all metrics for all subgraphs
            - name: kind
              value: router_response
          subgraph: # Attribute configuration for requests to/responses from subgraphs
            all:
              static:
              # Always apply this attribute to all metrics for all subgraphs
              - name: kind
                value: subgraph_response

Can you help me convert this to v2? There are 2 static ones and one dynamic.

I tried moving the dynamic one like this:

telemetry:
  # Configuration to send traces and metrics to an OpenTelemetry Protocol compatible service
  instrumentation:
    instruments:
      router:
        http.server.request.duration:
          attributes:
            client_name:
              request_header: "apollographql-client-name"

But then I get an error message:

2025-05-08T12:37:53.607632Z ERROR  Not connected to GraphOS. In order to enable these features for a self-hosted instance of Apollo Router, the Router must be connected to a graph in GraphOS (using APOLLO_KEY and APOLLO_GRAPH_REF) that provides a license for the following features:

Configuration yaml:
* Advanced telemetry
  .telemetry..instruments

See https://go.apollo.dev/o/elp for more information.

And for the two static ones, the guide doesn’t mention how to do static attributes on subgraph / supergraph level. I tried this:

telemetry:
  # Configuration to send traces and metrics to an OpenTelemetry Protocol compatible service
  exporters:
    metrics:
      common:
        service_name: "router"
        resource:
          supergraph:
            kind: router_response
          subgraph:
            kind: subgraph_response

and

  exporters:
    metrics:
      common:
        service_name: "router"
        supergraph:
          kind: router_response
        subgraph:
          kind: subgraph_response

But I can’t figure out what the router wants.