2022-04-15 15:44:08 +02:00
---
title: "Traefik Haystack Documentation"
description: "Traefik supports several tracing backends, including Haystack. Learn how to implement it for observability in Traefik Proxy. Read the technical documentation."
---
2019-06-28 00:16:04 +02:00
# Haystack
2021-09-29 10:40:14 +02:00
To enable the Haystack tracer:
2019-06-28 00:16:04 +02:00
2019-07-16 09:54:04 +02:00
```yaml tab="File (YAML)"
tracing:
haystack: {}
```
2021-06-19 00:08:08 +02:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
```
2019-06-28 00:16:04 +02:00
```bash tab="CLI"
2019-07-22 09:58:04 +02:00
--tracing.haystack=true
2019-06-28 00:16:04 +02:00
```
#### `localAgentHost`
2021-09-29 10:40:14 +02:00
_Required, Default="127.0.0.1"_
2019-06-28 00:16:04 +02:00
2021-09-29 10:40:14 +02:00
Local Agent Host instructs reporter to send spans to the Haystack Agent at this address.
2019-06-28 00:16:04 +02:00
2019-07-16 09:54:04 +02:00
```yaml tab="File (YAML)"
tracing:
haystack:
localAgentHost: 127.0.0.1
```
2021-06-19 00:08:08 +02:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
localAgentHost = "127.0.0.1"
```
2019-06-28 00:16:04 +02:00
```bash tab="CLI"
2019-11-19 10:18:05 +01:00
--tracing.haystack.localAgentHost=127.0.0.1
2019-06-28 00:16:04 +02:00
```
#### `localAgentPort`
2021-09-29 10:40:14 +02:00
_Required, Default=35000_
2019-06-28 00:16:04 +02:00
2021-09-29 10:40:14 +02:00
Local Agent Port instructs reporter to send spans to the Haystack Agent at this port.
2019-06-28 00:16:04 +02:00
2019-07-16 09:54:04 +02:00
```yaml tab="File (YAML)"
tracing:
haystack:
2020-02-26 04:10:06 -06:00
localAgentPort: 35000
2019-07-16 09:54:04 +02:00
```
2021-06-19 00:08:08 +02:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
localAgentPort = 35000
```
2019-06-28 00:16:04 +02:00
```bash tab="CLI"
2020-02-26 04:10:06 -06:00
--tracing.haystack.localAgentPort=35000
2019-06-28 00:16:04 +02:00
```
#### `globalTag`
_Optional, Default=empty_
2021-09-29 10:40:14 +02:00
Applies shared key:value tag on all spans.
2019-06-28 00:16:04 +02:00
2019-07-16 09:54:04 +02:00
```yaml tab="File (YAML)"
tracing:
haystack:
globalTag: sample:test
```
2021-06-19 00:08:08 +02:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
globalTag = "sample:test"
```
2019-06-28 00:16:04 +02:00
```bash tab="CLI"
2019-11-19 10:18:05 +01:00
--tracing.haystack.globalTag=sample:test
2019-06-28 00:16:04 +02:00
```
#### `traceIDHeaderName`
_Optional, Default=empty_
2021-09-29 10:40:14 +02:00
Sets the header name used to store the trace ID.
2019-06-28 00:16:04 +02:00
2019-07-16 09:54:04 +02:00
```yaml tab="File (YAML)"
tracing:
haystack:
2020-02-26 04:10:06 -06:00
traceIDHeaderName: Trace-ID
2019-07-16 09:54:04 +02:00
```
2021-06-19 00:08:08 +02:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
traceIDHeaderName = "Trace-ID"
```
2019-06-28 00:16:04 +02:00
```bash tab="CLI"
2020-02-26 04:10:06 -06:00
--tracing.haystack.traceIDHeaderName=Trace-ID
2019-06-28 00:16:04 +02:00
```
#### `parentIDHeaderName`
_Optional, Default=empty_
2021-09-29 10:40:14 +02:00
Sets the header name used to store the parent ID.
2019-06-28 00:16:04 +02:00
2019-07-16 09:54:04 +02:00
```yaml tab="File (YAML)"
tracing:
haystack:
2020-02-26 04:10:06 -06:00
parentIDHeaderName: Parent-Message-ID
2019-07-16 09:54:04 +02:00
```
2021-06-19 00:08:08 +02:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
parentIDHeaderName = "Parent-Message-ID"
```
2019-06-28 00:16:04 +02:00
```bash tab="CLI"
2020-02-26 04:10:06 -06:00
--tracing.haystack.parentIDHeaderName=Parent-Message-ID
2019-06-28 00:16:04 +02:00
```
#### `spanIDHeaderName`
_Optional, Default=empty_
2021-09-29 10:40:14 +02:00
Sets the header name used to store the span ID.
2019-06-28 00:16:04 +02:00
2019-07-16 09:54:04 +02:00
```yaml tab="File (YAML)"
tracing:
haystack:
2020-02-26 04:10:06 -06:00
spanIDHeaderName: Message-ID
2019-07-16 09:54:04 +02:00
```
2021-06-19 00:08:08 +02:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
spanIDHeaderName = "Message-ID"
```
2019-06-28 00:16:04 +02:00
```bash tab="CLI"
2020-02-26 04:10:06 -06:00
--tracing.haystack.spanIDHeaderName=Message-ID
2019-06-28 00:16:04 +02:00
```
#### `baggagePrefixHeaderName`
_Optional, Default=empty_
2021-09-29 10:40:14 +02:00
Sets the header name prefix used to store baggage items in a map.
2019-06-28 00:16:04 +02:00
2019-07-16 09:54:04 +02:00
```yaml tab="File (YAML)"
tracing:
haystack:
baggagePrefixHeaderName: "sample"
```
2021-06-19 00:08:08 +02:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
baggagePrefixHeaderName = "sample"
```
2019-06-28 00:16:04 +02:00
```bash tab="CLI"
2019-11-19 10:18:05 +01:00
--tracing.haystack.baggagePrefixHeaderName=sample
2019-06-28 00:16:04 +02:00
```