-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
enabled
field for telemetry exporters (#3952)
Adds an enabled field to all the telemetry endpoint. We can now move away from use of Optional in the telemetry config structures. Part of #3226 <!-- start metadata --> --- **Checklist** Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review. - [ ] Changes are compatible[^1] - [ ] Documentation[^2] completed - [ ] Performance impact assessed and acceptable - Tests added and passing[^3] - [ ] Unit Tests - [ ] Integration Tests - [ ] Manual Tests **Exceptions** *Note any exceptions here* **Notes** [^1]: It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. [^2]: Configuration is an important part of many changes. Where applicable please try to document configuration examples. [^3]: Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. --------- Co-authored-by: bryn <[email protected]>
- Loading branch information
Showing
61 changed files
with
276 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
### Add `enabled` field for telemetry exporters ([PR #3952](https://github.com/apollographql/router/pull/3952)) | ||
|
||
Telemetry configuration now supports `enabled` on all exporters. This allows exporters to be disabled without removing them from the configuration and in addition allows for a more streamlined default configuration. | ||
|
||
```diff | ||
telemetry: | ||
tracing: | ||
datadog: | ||
+ enabled: true | ||
jaeger: | ||
+ enabled: true | ||
otlp: | ||
+ enabled: true | ||
zipkin: | ||
+ enabled: true | ||
``` | ||
|
||
Existing configurations will be migrated to the new format automatically on startup. However, you should update your configuration to use the new format as soon as possible. | ||
|
||
By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/3952 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
apollo-router/src/configuration/migrations/0012-telemetry-exporters-enabled.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
description: Telemetry exporters now have an enabled field | ||
actions: | ||
- type: add | ||
path: telemetry.tracing.jaeger | ||
name: enabled | ||
value: true | ||
- type: add | ||
path: telemetry.tracing.otlp | ||
name: enabled | ||
value: true | ||
- type: add | ||
path: telemetry.tracing.zipkin | ||
name: enabled | ||
value: true | ||
- type: add | ||
path: telemetry.tracing.datadog | ||
name: enabled | ||
value: true | ||
- type: add | ||
path: telemetry.metrics.otlp | ||
name: enabled | ||
value: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
..._router__configuration__tests__upgrade_old_configuration@datadog_enabled.router.yaml.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: apollo-router/src/configuration/tests.rs | ||
expression: new_config | ||
--- | ||
--- | ||
telemetry: | ||
tracing: | ||
datadog: | ||
endpoint: default | ||
enabled: true | ||
|
12 changes: 12 additions & 0 deletions
12
...o_router__configuration__tests__upgrade_old_configuration@jaeger_enabled.router.yaml.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
source: apollo-router/src/configuration/tests.rs | ||
expression: new_config | ||
--- | ||
--- | ||
telemetry: | ||
tracing: | ||
jaeger: | ||
agent: | ||
endpoint: default | ||
enabled: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ telemetry: | |
endpoint: default | ||
batch_processor: | ||
scheduled_delay: 100ms | ||
enabled: true | ||
|
15 changes: 15 additions & 0 deletions
15
...llo_router__configuration__tests__upgrade_old_configuration@otlp_enabled.router.yaml.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
source: apollo-router/src/configuration/tests.rs | ||
expression: new_config | ||
--- | ||
--- | ||
telemetry: | ||
tracing: | ||
otlp: | ||
endpoint: default | ||
enabled: true | ||
metrics: | ||
otlp: | ||
endpoint: default | ||
enabled: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,5 @@ telemetry: | |
endpoint: default | ||
batch_processor: | ||
max_export_timeout: 5s | ||
enabled: true | ||
|
Oops, something went wrong.