2022-04-15 13:44:08 +00: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-27 22:16:04 +00:00
# Haystack
2021-09-29 08:40:14 +00:00
To enable the Haystack tracer:
2019-06-27 22:16:04 +00:00
2019-07-16 07:54:04 +00:00
```yaml tab="File (YAML)"
tracing:
haystack: {}
```
2021-06-18 22:08:08 +00:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
```
2019-06-27 22:16:04 +00:00
```bash tab="CLI"
2019-07-22 07:58:04 +00:00
--tracing.haystack=true
2019-06-27 22:16:04 +00:00
```
#### `localAgentHost`
2021-09-29 08:40:14 +00:00
_Required, Default="127.0.0.1"_
2019-06-27 22:16:04 +00:00
2021-09-29 08:40:14 +00:00
Local Agent Host instructs reporter to send spans to the Haystack Agent at this address.
2019-06-27 22:16:04 +00:00
2019-07-16 07:54:04 +00:00
```yaml tab="File (YAML)"
tracing:
haystack:
localAgentHost: 127.0.0.1
```
2021-06-18 22:08:08 +00:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
localAgentHost = "127.0.0.1"
```
2019-06-27 22:16:04 +00:00
```bash tab="CLI"
2019-11-19 09:18:05 +00:00
--tracing.haystack.localAgentHost=127.0.0.1
2019-06-27 22:16:04 +00:00
```
#### `localAgentPort`
2021-09-29 08:40:14 +00:00
_Required, Default=35000_
2019-06-27 22:16:04 +00:00
2021-09-29 08:40:14 +00:00
Local Agent Port instructs reporter to send spans to the Haystack Agent at this port.
2019-06-27 22:16:04 +00:00
2019-07-16 07:54:04 +00:00
```yaml tab="File (YAML)"
tracing:
haystack:
2020-02-26 10:10:06 +00:00
localAgentPort: 35000
2019-07-16 07:54:04 +00:00
```
2021-06-18 22:08:08 +00:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
localAgentPort = 35000
```
2019-06-27 22:16:04 +00:00
```bash tab="CLI"
2020-02-26 10:10:06 +00:00
--tracing.haystack.localAgentPort=35000
2019-06-27 22:16:04 +00:00
```
#### `globalTag`
_Optional, Default=empty_
2021-09-29 08:40:14 +00:00
Applies shared key:value tag on all spans.
2019-06-27 22:16:04 +00:00
2019-07-16 07:54:04 +00:00
```yaml tab="File (YAML)"
tracing:
haystack:
globalTag: sample:test
```
2021-06-18 22:08:08 +00:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
globalTag = "sample:test"
```
2019-06-27 22:16:04 +00:00
```bash tab="CLI"
2019-11-19 09:18:05 +00:00
--tracing.haystack.globalTag=sample:test
2019-06-27 22:16:04 +00:00
```
#### `traceIDHeaderName`
_Optional, Default=empty_
2021-09-29 08:40:14 +00:00
Sets the header name used to store the trace ID.
2019-06-27 22:16:04 +00:00
2019-07-16 07:54:04 +00:00
```yaml tab="File (YAML)"
tracing:
haystack:
2020-02-26 10:10:06 +00:00
traceIDHeaderName: Trace-ID
2019-07-16 07:54:04 +00:00
```
2021-06-18 22:08:08 +00:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
traceIDHeaderName = "Trace-ID"
```
2019-06-27 22:16:04 +00:00
```bash tab="CLI"
2020-02-26 10:10:06 +00:00
--tracing.haystack.traceIDHeaderName=Trace-ID
2019-06-27 22:16:04 +00:00
```
#### `parentIDHeaderName`
_Optional, Default=empty_
2021-09-29 08:40:14 +00:00
Sets the header name used to store the parent ID.
2019-06-27 22:16:04 +00:00
2019-07-16 07:54:04 +00:00
```yaml tab="File (YAML)"
tracing:
haystack:
2020-02-26 10:10:06 +00:00
parentIDHeaderName: Parent-Message-ID
2019-07-16 07:54:04 +00:00
```
2021-06-18 22:08:08 +00:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
parentIDHeaderName = "Parent-Message-ID"
```
2019-06-27 22:16:04 +00:00
```bash tab="CLI"
2020-02-26 10:10:06 +00:00
--tracing.haystack.parentIDHeaderName=Parent-Message-ID
2019-06-27 22:16:04 +00:00
```
#### `spanIDHeaderName`
_Optional, Default=empty_
2021-09-29 08:40:14 +00:00
Sets the header name used to store the span ID.
2019-06-27 22:16:04 +00:00
2019-07-16 07:54:04 +00:00
```yaml tab="File (YAML)"
tracing:
haystack:
2020-02-26 10:10:06 +00:00
spanIDHeaderName: Message-ID
2019-07-16 07:54:04 +00:00
```
2021-06-18 22:08:08 +00:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
spanIDHeaderName = "Message-ID"
```
2019-06-27 22:16:04 +00:00
```bash tab="CLI"
2020-02-26 10:10:06 +00:00
--tracing.haystack.spanIDHeaderName=Message-ID
2019-06-27 22:16:04 +00:00
```
#### `baggagePrefixHeaderName`
_Optional, Default=empty_
2021-09-29 08:40:14 +00:00
Sets the header name prefix used to store baggage items in a map.
2019-06-27 22:16:04 +00:00
2019-07-16 07:54:04 +00:00
```yaml tab="File (YAML)"
tracing:
haystack:
baggagePrefixHeaderName: "sample"
```
2021-06-18 22:08:08 +00:00
```toml tab="File (TOML)"
[tracing]
[tracing.haystack]
baggagePrefixHeaderName = "sample"
```
2019-06-27 22:16:04 +00:00
```bash tab="CLI"
2019-11-19 09:18:05 +00:00
--tracing.haystack.baggagePrefixHeaderName=sample
2019-06-27 22:16:04 +00:00
```