docs(tracing): update env var docs for new tracing env vars
This should have been updated as part of 967bd6932
Gus Eggert committed
May 4, 2022 at 20:12 UTC
0ab4367160a56476fdd7a79ccbda5a2e9f376879
1 file changed
+34
-35
docs/environment-variables.md
+34
-35
@@ -147,20 +147,45 @@ and outputs it to `rcmgr.json.gz`
147
Default: disabled (not set)
148
149
# Tracing
150
+For advanced configuration (e.g. ratio-based sampling), see also: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md
151
151
-## `IPFS_TRACING`
152
-Enables OpenTelemetry tracing.
152
+## `OTEL_TRACES_EXPORTER`
153
+Specifies the exporters to use as a comma-separated string. Each exporter has a set of additional environment variables used to configure it. The following values are supported:
154
+
155
+- `otlp`
156
+- `jaeger`
157
+- `zipkin`
158
+- `file` -- appends traces to a JSON file on the filesystem
159
+
160
+Setting this enables OpenTelemetry tracing.
161
162
**NOTE** Tracing support is experimental: releases may contain tracing-related breaking changes.
163
156
-Default: false
164
+Default: "" (no exporters)
165
158
-## `IPFS_TRACING_JAEGER`
159
-Enables the Jaeger exporter for OpenTelemetry.
166
+## `OTLP Exporter`
167
+Unless specified in this section, the OTLP exporter uses the environment variables documented here: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md
168
161
-For additional Jaeger exporter configuration, see: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#jaeger-exporter
169
+### `OTEL_EXPORTER_OTLP_PROTOCOL`
170
+Specifies the OTLP protocol to use, which is one of:
171
163
-Default: false
172
+- `grpc`
173
+- `http/protobuf`
174
+
175
+Default: "grpc"
176
+
177
+## `Jaeger Exporter`
178
+
179
+See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#jaeger-exporter
180
+
181
+## `Zipkin Exporter`
182
+See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#zipkin-exporter
183
+
184
+## `File Exporter`
185
+### `OTEL_EXPORTER_FILE_PATH`
186
+Specifies the filesystem path for the JSON file.
187
+
188
+Default: "$PWD/traces.json"
189
190
### How to use Jaeger UI
191
@@ -177,6 +202,7 @@ $ docker run --rm -it --name jaeger \
202
-p 5778:5778 \
203
-p 16686:16686 \
204
-p 14268:14268 \
205
+ -p 14268:14269 \
206
-p 14250:14250 \
207
-p 9411:9411 \
208
jaegertracing/all-in-one
@@ -184,34 +210,7 @@ $ docker run --rm -it --name jaeger \
210
211
Then, in other terminal, start go-ipfs with Jaeger tracing enabled:
212
```
187
-$ IPFS_TRACING=1 IPFS_TRACING_JAEGER=1 ipfs daemon
213
+$ OTEL_TRACES_EXPORTER=jaeger ipfs daemon
214
```
215
216
Finally, the [Jaeger UI](https://github.com/jaegertracing/jaeger-ui#readme) is available at http://localhost:16686
191
-
192
-
193
-## `IPFS_TRACING_OTLP_HTTP`
194
-Enables the OTLP HTTP exporter for OpenTelemetry.
195
-
196
-For additional exporter configuration, see: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md
197
-
198
-Default: false
199
-
200
-## `IPFS_TRACING_OTLP_GRPC`
201
-Enables the OTLP gRPC exporter for OpenTelemetry.
202
-
203
-For additional exporter configuration, see: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md
204
-
205
-Default: false
206
-
207
-## `IPFS_TRACING_FILE`
208
-Enables the file exporter for OpenTelemetry, writing traces to the given file in JSON format.
209
-
210
-Example: "/var/log/ipfs-traces.json"
211
-
212
-Default: "" (disabled)
213
-
214
-## `IPFS_TRACING_RATIO`
215
-The ratio of traces to export, as a floating point value in the interval [0, 1].
216
-
217
-Default: 1.0 (export all traces)