How to configure Loki's urlLabel for datasource provisioning

  • What Grafana version and what operating system are you using?
    11.1.1, linux

  • Can you copy/paste the configuration(s) that you are having problems with?

  - name: Loki
    type: loki
    url: {{ fact_monitoring_loki_api_url }}
    uid: loki-datasource
    jsonData:
      derivedFields:
        - datasourceUid: tempo-datasource
          name: TraceID
          matcherRegex: '\[TID:([^\]]+)\]'
          url: '$${__value.raw}'

I found that there is a field named urllabel in the datasources UI, and how can I config it by yaml?

Datasource for prom has same issues too:

The documents shows:

apiVersion: 1

datasources:
  - name: Prometheus
    type: prometheus
    access: proxy
    # Access mode - proxy (server in the UI) or direct (browser in the UI).
    url: http://localhost:9090
    jsonData:
      httpMethod: POST
      manageAlerts: true
      prometheusType: Prometheus
      prometheusVersion: 2.44.0
      cacheLevel: 'High'
      disableRecordingRules: false
      incrementalQueryOverlapWindow: 10m
      exemplarTraceIdDestinations:
        # Field with internal link pointing to data source in Grafana.
        # datasourceUid value can be anything, but it should be unique across all defined data source uids.
        - datasourceUid: my_jaeger_uid
          name: traceID

        # Field with external link.
        - name: traceID
          url: 'http://localhost:3000/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22Jaeger%22,%7B%22query%22:%22$${__value.raw}%22%7D%5D'

But it doesn’t mention how to configure the ‘labelName’ and ‘urlLabel’: