From e8c4c01d6948d1dcd98b1199f62ac2f015c4defd Mon Sep 17 00:00:00 2001 From: Ravishankar Date: Sat, 7 Dec 2024 16:12:25 +0530 Subject: [PATCH 1/2] Add documentation for filename usage --- .../reference/components/otelcol/otelcol.auth.bearer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/reference/components/otelcol/otelcol.auth.bearer.md b/docs/sources/reference/components/otelcol/otelcol.auth.bearer.md index f0bcd4e1ef..f965e27122 100644 --- a/docs/sources/reference/components/otelcol/otelcol.auth.bearer.md +++ b/docs/sources/reference/components/otelcol/otelcol.auth.bearer.md @@ -38,7 +38,7 @@ Name | Type | Description | Default `scheme` | `string` | Authentication scheme name. | "Bearer" | no When sending the token, the value of `scheme` is prepended to the `token` value. -The string is then sent out as either a header (in case of HTTP) or as metadata (in case of gRPC). +The string is then sent out as either a header (in case of HTTP) or as metadata (in case of gRPC). If we are using file for storing the token we can refer the value of `token` using `local.file` ## Blocks @@ -97,7 +97,7 @@ otelcol.auth.bearer "creds" { The example below configures [otelcol.exporter.otlphttp][] to use a bearer token authentication. -If we assume that the value of the `API_KEY` environment variable is `SECRET_API_KEY`, then +If we assume that the value of the `API_KEY` environment variable is `SECRET_API_KEY`, then the `Authorization` HTTP header is set to `MyScheme SECRET_API_KEY`. ```alloy From 7601fc280e89559c502fcf7810201f228ac82e51 Mon Sep 17 00:00:00 2001 From: William Dumont Date: Wed, 11 Dec 2024 10:03:08 +0100 Subject: [PATCH 2/2] Update docs/sources/reference/components/otelcol/otelcol.auth.bearer.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- .../reference/components/otelcol/otelcol.auth.bearer.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/sources/reference/components/otelcol/otelcol.auth.bearer.md b/docs/sources/reference/components/otelcol/otelcol.auth.bearer.md index f965e27122..e7725159e5 100644 --- a/docs/sources/reference/components/otelcol/otelcol.auth.bearer.md +++ b/docs/sources/reference/components/otelcol/otelcol.auth.bearer.md @@ -38,7 +38,11 @@ Name | Type | Description | Default `scheme` | `string` | Authentication scheme name. | "Bearer" | no When sending the token, the value of `scheme` is prepended to the `token` value. -The string is then sent out as either a header (in case of HTTP) or as metadata (in case of gRPC). If we are using file for storing the token we can refer the value of `token` using `local.file` +The string is then sent out as either a header (in case of HTTP) or as metadata (in case of gRPC). + +If you use a file to store the token, you can use `[local.file`][local.file] to retrieve the `token` value from the file. + +[local.file]: ../../local/local.file/ ## Blocks