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

Remove experimental_when_header feature #6285

Merged
merged 6 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
63 changes: 63 additions & 0 deletions docs/source/reference/migration/from-router-v1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,69 @@ telemetry:
metrics_reference_mode: standard
```

### Logging

If you used the `experimental_when_header` feature previously like this for example:

```yaml title="router.previous.yaml"
telemetry:
exporters:
logging:
# If one of these headers matches we will log supergraph and subgraphs requests/responses
experimental_when_header: # REMOVED
- name: apollo-router-log-request
value: my_client
headers: true # default: false
body: true # default: false
```

This feature not longer exists and can be replaced with another one included in custom telemetry. Here is an example on how you could have the same behavior with the new configuration:
bnjjj marked this conversation as resolved.
Show resolved Hide resolved

```yaml title="router.yaml"
telemetry:
instrumentation:
events:
router:
request: # Display router request log
level: info
condition:
eq:
- request_header: apollo-router-log-request
- my_client
response: # Display router response log
level: info
condition:
eq:
- request_header: apollo-router-log-request
- my_client
supergraph:
request: # Display supergraph request log
level: info
condition:
eq:
- request_header: apollo-router-log-request
- my_client
response:
level: info
condition:
eq:
- request_header: apollo-router-log-request
- my_client
subgraph:
request: # Display subgraph request log
level: info
condition:
eq:
- supergraph_request_header: apollo-router-log-request
- my_client
response: # Display subgraph response log
level: info
condition:
eq:
- supergraph_request_header: apollo-router-log-request
- my_client
```

### Deploy your router

Make sure that you are referencing the correct router release: **v2.0.0-preview.0**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ The subgraph service executes multiple times during query execution, with each e
| `supergraph_operation_kind` | Yes | `string` | The operation kind from the supergraph query |
| `supergraph_query` | Yes | `string` | The graphql query to the supergraph |
| `supergraph_query_variable` | Yes | | The name of a supergraph query variable |
| `supergraph_request_header` | Yes | | The name of a supergraph request header |
bnjjj marked this conversation as resolved.
Show resolved Hide resolved
| `request_context` | Yes | | The name of a request context key |
| `response_context` | Yes | | The name of a response context key |
| `baggage` | Yes | | The name of a baggage item |
Expand Down