docs/sources/datasources/tempo/configure-tempo-data-source/provision.md
You can define and configure the Tempo data source in YAML files as part of the Grafana provisioning system.
You can use version control, like Git, to track and manage file changes. Changes can be updated or rolled back as needed.
{{< admonition type="note" >}} Provisioning via YAML is primarily used for self-managed Grafana instances. {{< /admonition >}}
For more information about provisioning and available configuration options, refer to Provisioning Grafana.
You can't modify a provisioned data source from the Grafana UI. The settings form is read-only and the Save & test button is replaced by Test (you can test the connection but not save changes).
To make changes, you can either:
This example provisioning YAML file sets up the equivalents of the options available in the Tempo data source UI.
Replace grafana-pyroscope-datasource with the actual UID of your Pyroscope datasource, and verify the other datasource Uid values match what's actually provisioned.
apiVersion: 1
datasources:
- name: Tempo
type: tempo
uid: EbPG8fYoz
url: http://localhost:3200
access: proxy
basicAuth: false
jsonData:
tracesToLogsV2:
# Field with an internal link pointing to a logs data source in Grafana.
# datasourceUid value must match the uid value of the logs data source.
datasourceUid: 'loki'
spanStartTimeShift: '-1h'
spanEndTimeShift: '1h'
tags: [{ key: 'job' }, { key: 'instance' }, { key: 'pod' }, { key: 'namespace' }]
filterByTraceID: false
filterBySpanID: false
customQuery: true
query: 'method="$${__span.tags.method}"'
tracesToMetrics:
datasourceUid: 'prom'
spanStartTimeShift: '-1h'
spanEndTimeShift: '1h'
tags: [{ key: 'service.name', value: 'service' }, { key: 'job' }]
queries:
- name: 'Sample query'
query: 'sum(rate(traces_spanmetrics_latency_bucket{$$__tags}[5m]))'
tracesToProfiles:
datasourceUid: 'grafana-pyroscope-datasource'
tags: [{ key: 'job' }, { key: 'instance' }, { key: 'pod' }, { key: 'namespace' }]
profileTypeId: 'process_cpu:cpu:nanoseconds:cpu:nanoseconds'
customQuery: true
query: 'method="$${__span.tags.method}"'
serviceMap:
datasourceUid: 'prometheus'
nodeGraph:
enabled: true
search:
hide: false
traceQuery:
timeShiftEnabled: true
spanStartTimeShift: '-1h'
spanEndTimeShift: '1h'
spanBar:
type: 'Tag'
tag: 'http.path'
streamingEnabled:
search: true
metrics: true
For details about individual settings, refer to:
tracesToLogsV2 blocktracesToMetrics blocktracesToProfiles blockserviceMap, nodeGraph, search, traceQuery, spanBar blocksIf you have a data source that is provisioned by a configuration file in Grafana Cloud, you can clone that provisioned data source and then edit the new data source in the Grafana UI.
For example, if you want to edit the trace to logs settings in your Tempo data source that is provisioned on Grafana Cloud, you can enable traceID and spanID filtering by cloning the data source.
To clone a provisioned data source, follow these steps:
Create a viewer Cloud Access Policy token in the Grafana Cloud Portal, making sure it has read permissions at least for the data types you are trying to clone.
Create a new data source of the same type you want to clone.
Copy all of the settings from the existing provisioned data source into the new data source while replacing the password with the API key you created.
The easiest way to do this is to open separate browser windows with the provisioned data source in one and the newly created data source in another.
After copying the HTTP and Auth section details, pasting the Cloud Access Policy token into the Password field, and changing any of the other options that you want, you can save and test the data source.