mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 03:46:37 +00:00
29056a767a
* improve code for metrics * improve code for metrics * fix * fix * Refactor telemetry initialization and environment functions ordering - Reorder functions in envs.rs by type size (8-bit to 64-bit, signed before unsigned) and add missing variants like get_env_opt_u16. - Optimize init_telemetry to support three modes: stdout logging (default error level with span tracing), file rolling logs (size-based with retention), and HTTP-based observability with sub-endpoints (trace, metric, log) falling back to unified endpoint. - Fix stdout logging issue by retaining WorkerGuard in OtelGuard to prevent premature release of async writer threads. - Enhance observability mode with HTTP protocol, compression, and proper resource management. - Update OtelGuard to include tracing_guard for stdout and flexi_logger_handles for file logging. - Improve error handling and configuration extraction in OtelConfig. * fix * up * fix * fix * improve code for obs * fix * fix
108 lines
3.2 KiB
YAML
108 lines
3.2 KiB
YAML
apiVersion: 1
|
|
|
|
datasources:
|
|
- name: Prometheus
|
|
type: prometheus
|
|
uid: prometheus
|
|
access: proxy
|
|
orgId: 1
|
|
url: http://prometheus:9090
|
|
basicAuth: false
|
|
isDefault: false
|
|
version: 1
|
|
editable: false
|
|
jsonData:
|
|
httpMethod: GET
|
|
- name: Tempo
|
|
type: tempo
|
|
access: proxy
|
|
orgId: 1
|
|
url: http://tempo:3200
|
|
basicAuth: false
|
|
isDefault: true
|
|
version: 1
|
|
editable: false
|
|
apiVersion: 1
|
|
uid: tempo
|
|
jsonData:
|
|
httpMethod: GET
|
|
serviceMap:
|
|
datasourceUid: prometheus
|
|
streamingEnabled:
|
|
search: true
|
|
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: [ 'job', 'instance', 'pod', '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: [ 'job', 'instance', 'pod', '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
|
|
- name: Jaeger
|
|
type: jaeger
|
|
uid: Jaeger
|
|
url: http://jaeger:16686
|
|
basicAuth: false
|
|
access: proxy
|
|
readOnly: false
|
|
isDefault: 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: [ 'job', 'instance', 'pod', '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]))'
|
|
nodeGraph:
|
|
enabled: true
|
|
traceQuery:
|
|
timeShiftEnabled: true
|
|
spanStartTimeShift: '1h'
|
|
spanEndTimeShift: '-1h'
|
|
spanBar:
|
|
type: 'None' |