Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document wildcards in attributes.select #996

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/sources/configure/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,30 @@ attributes:
exclude: ["k8s.pod.*"]
```

Additionally, you can use "`*`" wildcards as metric names to add and exclude attributes for
groups of metrics having the same name. For example:

```yaml
attributes:
select:
http_*:
include: ["*"]
exclude: ["http_path", "http_route"]
http_client_*:
# override http_* exclusion
include: ["http_path"]
http_server_*:
# override http_* exclusion
include: ["http_route"]
```

In the previous example, all the metrics with a name starting with `http_` (or `http.`) would include all
grafsean marked this conversation as resolved.
Show resolved Hide resolved
the possible attributes but `http_path` and `http_route` (or `http.path`/`http.route`).
The `http_client_*` and `http_server_*` sections would override the base configuration, enabling the
`http_path` attribute for the HTTP client metrics and `http_route` for the HTTP server metrics.

When a metric name matches multiple definitions using wildcards, exact matches have higher precedence than wild card matches.

### Instance ID decoration

The metrics and the traces are decorated with a unique instance ID string, identifying
Expand Down
Loading