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

Reconcile dev after merge to main for v12.3.456 #5291

Closed
wants to merge 1 commit into from
Closed
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
98 changes: 51 additions & 47 deletions docs/source/configuration/telemetry/instrumentation/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,12 @@ Custom events have a level, `trace`, `debug`, `info`, `warn`, `error` or `off` (
To set the level:
```yaml title="future.router.yaml"
telemetry:
events:
router:
acme.event:
level: info # trace, debug, info, warn, error, off
# ...
instrumentation:
events:
router:
acme.event:
level: info # trace, debug, info, warn, error, off
# ...
```

### `condition`
Expand All @@ -134,14 +135,15 @@ In `router.yaml`, set a `condition` with an equality (`eq`) check:

```yaml title="future.router.yaml"
telemetry:
events:
router:
acme.event:
# ...
condition:
eq:
- 200
- response_status: Code
instrumentation:
events:
router:
acme.event:
# ...
condition:
eq:
- 200
- response_status: Code
```

For more details, see [Conditions](./conditions).
Expand All @@ -155,16 +157,17 @@ The attributes available depend on the service of the request lifecycle.

```yaml title="future.router.yaml"
telemetry:
events:
router:
my.event:
# ...
attributes:
# Standard attributes
http.response.status_code: true
# Custom attributes
"my_attribute":
response_header: "x-my-header"
instrumentation:
events:
router:
my.event:
# ...
attributes:
# Standard attributes
http.response.status_code: true
# Custom attributes
"my_attribute":
response_header: "x-my-header"
```

## Event configuration example
Expand All @@ -173,30 +176,31 @@ For example, the router service can be configured with standard events (`request

```yaml title="future.router.yaml"
telemetry:
events:
router:
# Standard events
request: info
response: info
error: info

# Custom events
my.event:
message: "my event message"
level: info
on: request
attributes:
http.response.body.size: false
# Only log when the x-log-request header is `log`
condition:
eq:
- "log"
- request_header: "x-log-request"

supergraph:
# Custom event configuration for supergraph service ...
subgraph:
# Custom event configuration for subgraph service ...
instrumentation:
events:
router:
# Standard events
request: info
response: info
error: info

# Custom events
my.event:
message: "my event message"
level: info
on: request
attributes:
http.response.body.size: false
# Only log when the x-log-request header is `log`
condition:
eq:
- "log"
- request_header: "x-log-request"

supergraph:
# Custom event configuration for supergraph service ...
subgraph:
# Custom event configuration for subgraph service ...
```

## Event configuration reference
Expand Down
Loading