Add resourceAttributes option to OTel metrics
Co-authored-by: Romain <rtribotte@users.noreply.github.com>
This commit is contained in:
parent
8c23eb6833
commit
7b78128d4e
14 changed files with 256 additions and 105 deletions
|
|
@ -340,6 +340,54 @@ accesslog:
|
|||
|
||||
The OpenTelemetry Logger exporter will export access logs to the collector using HTTPS by default to https://localhost:4318/v1/logs, see the [gRPC Section](#grpc-configuration) to use gRPC.
|
||||
|
||||
### `serviceName`
|
||||
|
||||
_Optional, Default="traefik"_
|
||||
|
||||
Defines the service name resource attribute.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
accesslog:
|
||||
otlp:
|
||||
serviceName: name
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[accesslog]
|
||||
[accesslog.otlp]
|
||||
serviceName = "name"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--accesslog.otlp.serviceName=name
|
||||
```
|
||||
|
||||
### `ressourceAttributes`
|
||||
|
||||
_Optional, Default=empty_
|
||||
|
||||
Defines additional resource attributes to be sent to the collector.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
accesslog:
|
||||
otlp:
|
||||
resourceAttributes:
|
||||
attr1: foo
|
||||
attr2: bar
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[accesslog]
|
||||
[accesslog.otlp.resourceAttributes]
|
||||
attr1 = "foo"
|
||||
attr2 = "bar"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--accesslog.otlp.resourceAttributes.attr1=foo
|
||||
--accesslog.otlp.resourceAttributes.attr2=bar
|
||||
```
|
||||
|
||||
### HTTP configuration
|
||||
|
||||
_Optional_
|
||||
|
|
|
|||
|
|
@ -219,6 +219,54 @@ log:
|
|||
|
||||
The OpenTelemetry Logger exporter will export logs to the collector using HTTPS by default to https://localhost:4318/v1/logs, see the [gRPC Section](#grpc-configuration) to use gRPC.
|
||||
|
||||
### `serviceName`
|
||||
|
||||
_Optional, Default="traefik"_
|
||||
|
||||
Defines the service name resource attribute.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
log:
|
||||
otlp:
|
||||
serviceName: name
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[log]
|
||||
[log.otlp]
|
||||
serviceName = "name"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--log.otlp.serviceName=name
|
||||
```
|
||||
|
||||
### `ressourceAttributes`
|
||||
|
||||
_Optional, Default=empty_
|
||||
|
||||
Defines additional resource attributes to be sent to the collector.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
log:
|
||||
otlp:
|
||||
resourceAttributes:
|
||||
attr1: foo
|
||||
attr2: bar
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[log]
|
||||
[log.otlp.resourceAttributes]
|
||||
attr1 = "foo"
|
||||
attr2 = "bar"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--log.otlp.resourceAttributes.attr1=foo
|
||||
--log.otlp.resourceAttributes.attr2=bar
|
||||
```
|
||||
|
||||
### HTTP configuration
|
||||
|
||||
_Optional_
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ metrics:
|
|||
|
||||
_Optional, Default="traefik"_
|
||||
|
||||
OTEL service name to use.
|
||||
Defines the service name resource attribute.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
|
|
@ -160,6 +160,31 @@ metrics:
|
|||
```bash tab="CLI"
|
||||
--metrics.otlp.serviceName=name
|
||||
```
|
||||
#### `ressourceAttributes`
|
||||
|
||||
_Optional, Default=empty_
|
||||
|
||||
Defines additional resource attributes to be sent to the collector.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
otlp:
|
||||
resourceAttributes:
|
||||
attr1: foo
|
||||
attr2: bar
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.otlp.resourceAttributes]
|
||||
attr1 = "foo"
|
||||
attr2 = "bar"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.otlp.resourceAttributes.attr1=foo
|
||||
--metrics.otlp.resourceAttributes.attr2=bar
|
||||
```
|
||||
|
||||
### HTTP configuration
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue