Derived fields of label type in Grafana yaml

Hello,

I have the following YAML trying to configure Grafana datasources.

- name: Loki
  type: loki
  orgId: 1
  url: http://loki:3100
  basicAuth: false
  isDefault: false
  version: 1
  uid: loki
  jsonData:
    derivedFields:
    - datasourceUid: tempo
      name: traceID
      type: label
      urlDisplayLabel: 'View Trace'
      url: '$${__value.raw}'

What I’m trying to do is to configure a derived field of label type, yet no matter what I do the end result defaults to regexpMatch. The documentation only provides examples for regexp so I’m a bit at a loss on how to configure a label field.

I would appreciated any pointers, thanks!

1 Like

Good point - wish the docs were more explicit about this but this definitely works, thanks!

For additional info, if want to add label type, should add two fields under derivedFields

matcherRegex: ${labelFieldName}
matcherType: label

Hope that the documentation will updated soon, thanks