diff --git a/.changesets/config_apollo_sig_ref_default_mode.md b/.changesets/config_apollo_sig_ref_default_mode.md deleted file mode 100644 index 1a1bfaaed7..0000000000 --- a/.changesets/config_apollo_sig_ref_default_mode.md +++ /dev/null @@ -1,5 +0,0 @@ -### Set Apollo metrics generation mode to `new` by default ([PR #5265](https://github.com/apollographql/router/pull/5265)) - -Changes the default value of `experimental_apollo_metrics_generation_mode` to `new`. All metrics are showing that identical signatures are being generated in this mode. - -By [@bonnici](https://github.com/bonnici) in https://github.com/apollographql/router/pull/5265 \ No newline at end of file diff --git a/.changesets/config_bnjjj_fix_studio_selector.md b/.changesets/config_bnjjj_fix_studio_selector.md deleted file mode 100644 index 043722efa3..0000000000 --- a/.changesets/config_bnjjj_fix_studio_selector.md +++ /dev/null @@ -1,14 +0,0 @@ -### Rename trace telemetry selector ([PR #5337](https://github.com/apollographql/router/pull/5337)) - -[v1.48.0](https://github.com/apollographql/router/releases/tag/v1.48.0) introduced the `apollo` `trace_id` selector. `trace_id` is a misnomer for this metric, since the selector actually represents a GraphOS Studio operation ID. To access this selector, use `studio_operation_id`: - -```yaml -telemetry: - instrumentation: - spans: - router: - "studio.operation.id": - studio_operation_id: true -``` - -By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5337 \ No newline at end of file diff --git a/.changesets/docs_bnjjj_docs_standard_instr.md b/.changesets/docs_bnjjj_docs_standard_instr.md deleted file mode 100644 index 13911c0ee1..0000000000 --- a/.changesets/docs_bnjjj_docs_standard_instr.md +++ /dev/null @@ -1,22 +0,0 @@ -### Standard instrument configuration documentation for subgraphs ([PR #5422](https://github.com/apollographql/router/pull/5422)) - -Added documentation about standard instruments available at the subgraph service level: - - * `http.client.request.body.size` - A histogram of request body sizes for requests handled by subgraphs. - * `http.client.request.duration` - A histogram of request durations for requests handled by subgraphs. - * `http.client.response.body.size` - A histogram of response body sizes for requests handled by subgraphs. - - -These instruments are configurable in `router.yaml`: - -```yaml title="router.yaml" -telemetry: - instrumentation: - instruments: - subgraph: - http.client.request.body.size: true # (default false) - http.client.request.duration: true # (default false) - http.client.response.body.size: true # (default false) -``` - -By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5422 \ No newline at end of file diff --git a/.changesets/docs_maria_frontmatter_update.md b/.changesets/docs_maria_frontmatter_update.md deleted file mode 100644 index c660059b39..0000000000 --- a/.changesets/docs_maria_frontmatter_update.md +++ /dev/null @@ -1,5 +0,0 @@ -### Update docs frontmatter for consistency and discoverability ([PR #5164](https://github.com/apollographql/router/pull/5164)) - -Makes title case consistent for page titles and adds subtitles and meta-descriptions are updated for better discoverability. - -By [@Meschreiber](https://github.com/@Meschreiber) in https://github.com/apollographql/router/pull/5164 diff --git a/.changesets/feat_apollo_signature_generation_enhancements.md b/.changesets/feat_apollo_signature_generation_enhancements.md deleted file mode 100644 index 57dc34cf85..0000000000 --- a/.changesets/feat_apollo_signature_generation_enhancements.md +++ /dev/null @@ -1,10 +0,0 @@ -### Apollo reporting signature enhancements ([PR #5062](https://github.com/apollographql/router/pull/5061)) - -Adds a new experimental configuration option to turn on some enhancements for the Apollo reporting stats report key: -* Signatures will include the full normalized form of input objects -* Signatures will include aliases -* Some small normalization improvements - -This new configuration (telemetry.apollo.experimental_apollo_signature_normalization_algorithm) only works when in `experimental_apollo_metrics_generation_mode: new` mode and we don't yet recommend enabling it while we continue to verify that the new functionality works as expected. - -By [@bonnici](https://github.com/bonnici) in https://github.com/apollographql/router/pull/5062 \ No newline at end of file diff --git a/.changesets/feat_bnjjj_add_missing_units_desc_instruments.md b/.changesets/feat_bnjjj_add_missing_units_desc_instruments.md deleted file mode 100644 index 58ecc80be0..0000000000 --- a/.changesets/feat_bnjjj_add_missing_units_desc_instruments.md +++ /dev/null @@ -1,5 +0,0 @@ -### Add description and units to standard instruments ([PR #5407](https://github.com/apollographql/router/pull/5407)) - -This PR adds description and units to standard instruments available in the router. These descriptions and units have been copy pasted directly from the [OpenTelemetry semantic conventions](https://opentelemetry.io/docs/specs/semconv/http/http-metrics/) and are needed for better integrations with APMs. - -By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5407 \ No newline at end of file diff --git a/.changesets/feat_bnjjj_feat_otel_name_attribute.md b/.changesets/feat_bnjjj_feat_otel_name_attribute.md deleted file mode 100644 index 9fe1fa787d..0000000000 --- a/.changesets/feat_bnjjj_feat_otel_name_attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -### Override tracing span names using custom span selectors ([Issue #5261](https://github.com/apollographql/router/issues/5261)) - -Adds the ability to override span names by setting the `otel.name` attribute on any custom telemetry [selectors](https://www.apollographql.com/docs/router/configuration/telemetry/instrumentation/selectors/) . - -This example changes the span name to `router`: - -```yaml -telemetry: - instrumentation: - spans: - router: - otel.name: - static: router # Override the span name to router -``` - -By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5365 \ No newline at end of file diff --git a/.changesets/feat_feature_shaika_add_ms_support_to_rhai_engine.md b/.changesets/feat_feature_shaika_add_ms_support_to_rhai_engine.md deleted file mode 100644 index 5a359cd64f..0000000000 --- a/.changesets/feat_feature_shaika_add_ms_support_to_rhai_engine.md +++ /dev/null @@ -1,10 +0,0 @@ -### Add support for `unix_ms_now` in Rhai customizations ([Issue #5182](https://github.com/apollographql/router/issues/5182)) - -Rhai customizations can now use the `unix_ms_now()` function to obtain the current Unix timestamp in milliseconds since the Unix epoch. - -For example: - -```rhai -fn supergraph_service(service) { - let now = unix_ms_now(); -} \ No newline at end of file diff --git a/.changesets/feat_garypen_router_340_extensions_with_lock.md b/.changesets/feat_garypen_router_340_extensions_with_lock.md deleted file mode 100644 index 3bfadfa59a..0000000000 --- a/.changesets/feat_garypen_router_340_extensions_with_lock.md +++ /dev/null @@ -1,7 +0,0 @@ -### Add Extensions with_lock() to try and avoid timing issues ([PR #5360](https://github.com/apollographql/router/pull/5360)) - -It's easy to trip over issues when interacting with Extensions because we inadvertently hold locks for too long. This can be a source of bugs in the router and causes a lot of tests to be flaky. - -with_lock() avoids this kind of problem by explicitly restricting the lifetime of the Extensions lock. - -By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/5360 \ No newline at end of file diff --git a/.changesets/feat_pq_warmup.md b/.changesets/feat_pq_warmup.md deleted file mode 100644 index c7cd503a4f..0000000000 --- a/.changesets/feat_pq_warmup.md +++ /dev/null @@ -1,13 +0,0 @@ -### Warm query plan cache using persisted queries on startup ([Issue #5334](https://github.com/apollographql/router/issues/5334)) - -Adds support for the router to use [persisted queries](https://www.apollographql.com/docs/graphos/operations/persisted-queries/) to warm the query plan cache upon startup using a new `experimental_prewarm_query_plan_cache` configuration option under `persisted_queries`. - -To enable: - -```yml -persisted_queries: - enabled: true - experimental_prewarm_query_plan_cache: true -``` - -By [@lleadbet](https://github.com/lleadbet) in https://github.com/apollographql/router/pull/5340 diff --git a/.changesets/feat_timbotnik_experimental_studio_otlp_tracing.md b/.changesets/feat_timbotnik_experimental_studio_otlp_tracing.md deleted file mode 100644 index e426b1edb6..0000000000 --- a/.changesets/feat_timbotnik_experimental_studio_otlp_tracing.md +++ /dev/null @@ -1,41 +0,0 @@ -### Add experimental support for sending traces to Studio via OTLP ([PR #4982](https://github.com/apollographql/router/pull/4982)) - -As the ecosystem around OpenTelemetry (OTel) has been expanding rapidly, we are evaluating a migration of Apollo's internal -tracing system to use an OTel-based protocol. - -In the short-term, benefits include: - -- A comprehensive way to visualize the router execution path in GraphOS Studio. -- Additional spans that were previously not included in Studio traces, such as query parsing, planning, execution, and more. -- Additional metadata such as subgraph fetch details, router idle / busy timing, and more. - -Long-term, we see this as a strategic enhancement to consolidate these two disparate tracing systems. -This will pave the way for future enhancements to more easily plug into the Studio trace visualizer. - -#### Configuration - -This change adds a new configuration option `experimental_otlp_tracing_sampler`. This can be used to send -a percentage of traces via OTLP instead of the native Apollo Usage Reporting protocol. Supported values: - -- `always_off` (default): send all traces via Apollo Usage Reporting protocol. -- `always_on`: send all traces via OTLP. -- `0.0 - 1.0`: the ratio of traces to send via OTLP (0.5 = 50 / 50). - -Note that this sampler is only applied _after_ the common tracing sampler, for example: - -#### Sample 1% of traces, send all traces via OTLP: - -```yaml -telemetry: - apollo: - # Send all traces via OTLP - experimental_otlp_tracing_sampler: always_on - - exporters: - tracing: - common: - # Sample traces at 1% of all traffic - sampler: 0.01 -``` - -By [@timbotnik](https://github.com/timbotnik) in https://github.com/apollographql/router/pull/4982 diff --git a/.changesets/fix_bnjjj_fix_5173.md b/.changesets/fix_bnjjj_fix_5173.md deleted file mode 100644 index c2b7309b6a..0000000000 --- a/.changesets/fix_bnjjj_fix_5173.md +++ /dev/null @@ -1,7 +0,0 @@ -### Log metrics overflow as a warning rather than an error ([Issue #5173](https://github.com/apollographql/router/issues/5173)) - -If a metric has too high a cardinality, the following is displayed as a warning instead of an error: - -`OpenTelemetry metric error occurred: Metrics error: Warning: Maximum data points for metric stream exceeded/ Entry added to overflow` - -By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5287 \ No newline at end of file diff --git a/.changesets/fix_bnjjj_fix_selector_context.md b/.changesets/fix_bnjjj_fix_selector_context.md deleted file mode 100644 index 3f996938d7..0000000000 --- a/.changesets/fix_bnjjj_fix_selector_context.md +++ /dev/null @@ -1,17 +0,0 @@ -### Add support of `response_context selector` when in errors ([PR #5288](https://github.com/apollographql/router/pull/5288)) - -Provides the ability to configure custom instruments. For example: - -```yaml -http.server.request.timeout: - type: counter - value: unit - description: "request in timeout" - unit: request - attributes: - graphql.operation.name: - response_context: operation_name - condition: - eq: - - "request timed out" - - error: reason \ No newline at end of file diff --git a/.changesets/fix_bnjjj_fix_subscription_metrics.md b/.changesets/fix_bnjjj_fix_subscription_metrics.md deleted file mode 100644 index f33261725c..0000000000 --- a/.changesets/fix_bnjjj_fix_subscription_metrics.md +++ /dev/null @@ -1,5 +0,0 @@ -### Inaccurate `apollo_router_opened_subscriptions` counter ([PR #5363](https://github.com/apollographql/router/pull/5363)) - -Fixes the `apollo_router_opened_subscriptions` counter which previously only incremented. The counter now also decrements. - -By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5363 \ No newline at end of file diff --git a/.changesets/fix_bryn_demand_control_formatting_hot_path.md b/.changesets/fix_bryn_demand_control_formatting_hot_path.md deleted file mode 100644 index 705ff92b42..0000000000 --- a/.changesets/fix_bryn_demand_control_formatting_hot_path.md +++ /dev/null @@ -1,5 +0,0 @@ -### Prevent formatting in hot path ([PR #5405](https://github.com/apollographql/router/pull/5405)) - -Removes unneeded formatting in the hot path for demand control to improve performance. - -By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/5405 diff --git a/.changesets/fix_bryn_optimize_graphq_instruments.md b/.changesets/fix_bryn_optimize_graphq_instruments.md deleted file mode 100644 index ec509b45a4..0000000000 --- a/.changesets/fix_bryn_optimize_graphq_instruments.md +++ /dev/null @@ -1,6 +0,0 @@ - -### Optimize GraphQL instruments ([PR #5375](https://github.com/apollographql/router/pull/5375)) - -When processing selectors for GraphQL instruments, heap allocations should be avoided for optimal performance. This change removes Vec allocations that were previously performed per field, yielding significant performance improvements. - -By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/5375 diff --git a/.changesets/fix_fix_content_type_error.md b/.changesets/fix_fix_content_type_error.md deleted file mode 100644 index 85c48b87a6..0000000000 --- a/.changesets/fix_fix_content_type_error.md +++ /dev/null @@ -1,13 +0,0 @@ -### Improve error message produced when subgraphs responses don't include an expected `content-type` header value ([Issue #5359](https://github.com/apollographql/router/issues/5359)) - -To enhance debuggability when a subgraph response lacks an expected `content-type` header value, the error message now includes additional details. - -Examples: - - * ``` - HTTP fetch failed from 'test': subgraph response contains invalid 'content-type' header value \"application/json,application/json\"; expected content-type: application/json or content-type: application/graphql-response+json - ``` - * ``` - HTTP fetch failed from 'test': subgraph response does not contain 'content-type' header; expected content-type: application/json or content-type: application/graphql-response+json - ``` -By [@IvanGoncharov](https://github.com/IvanGoncharov) in https://github.com/apollographql/router/pull/5223 \ No newline at end of file diff --git a/.changesets/fix_geal_schema_hash.md b/.changesets/fix_geal_schema_hash.md deleted file mode 100644 index 70be825fa8..0000000000 --- a/.changesets/fix_geal_schema_hash.md +++ /dev/null @@ -1,7 +0,0 @@ -### Skip hashing the entire schema on every query plan cache lookup ([PR #5374](https://github.com/apollographql/router/pull/5374)) - -This fixes performance issues when looking up query plans for large schemas. - -โš ๏ธ Because this feature changes the query plan cache key, distributed caches will need to be repopulated. - -By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/5374 \ No newline at end of file diff --git a/.changesets/maint_bryn_disable_tests_apollo_key_missing.md b/.changesets/maint_bryn_disable_tests_apollo_key_missing.md deleted file mode 100644 index 0aa1b56785..0000000000 --- a/.changesets/maint_bryn_disable_tests_apollo_key_missing.md +++ /dev/null @@ -1,6 +0,0 @@ -### Skip GraphOS tests when Apollo key not present ([PR #5362](https://github.com/apollographql/router/pull/5362)) - -Some tests require `APOLLO_KEY` and `APOLLO_GRAPH_REF` to execute successfully. -These are now skipped if these env variables are not present. - -By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/5362 diff --git a/CHANGELOG.md b/CHANGELOG.md index a97db40fea..e931595fa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,247 @@ All notable changes to Router will be documented in this file. This project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec/v2.0.0.html). +# [1.49.0] - 2024-06-18 + +## ๐Ÿš€ Features + +### Override tracing span names using custom span selectors ([Issue #5261](https://github.com/apollographql/router/issues/5261)) + +Adds the ability to override span names by setting the `otel.name` attribute on any custom telemetry [selectors](https://www.apollographql.com/docs/router/configuration/telemetry/instrumentation/selectors/) . + +This example changes the span name to `router`: + +```yaml +telemetry: + instrumentation: + spans: + router: + otel.name: + static: router # Override the span name to router +``` + +By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5365 + +### Add description and units to standard instruments ([PR #5407](https://github.com/apollographql/router/pull/5407)) + +This PR adds description and units to standard instruments available in the router. These descriptions and units have been copy pasted directly from the [OpenTelemetry semantic conventions](https://opentelemetry.io/docs/specs/semconv/http/http-metrics/) and are needed for better integrations with APMs. + +By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5407 + +### Add `with_lock()` method to `Extensions` to facilitate avoidance of timing issues ([PR #5360](https://github.com/apollographql/router/pull/5360)) + +In the case that you necessitated writing custom Rust plugins, we've introduced [`with_lock()`](https://docs.rs/apollo-router/1.49.0/apollo_router/struct.ExtensionsMutex.html#method.with_lock) which explicitly restricts the lifetime of the `Extensions` lock. + +Without this method, it was too easy to run into issues interacting with the [`Extensions`](https://docs.rs/apollo-router/1.49.0-rc.1/apollo_router/struct.ExtensionsMutex.html) since we would inadvertently hold locks for too long. This was a source of bugs in the router and caused a lot of tests to be flaky. + +By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/5360 + +### Add support for `unix_ms_now` in Rhai customizations ([Issue #5182](https://github.com/apollographql/router/issues/5182)) + +Rhai customizations can now use the `unix_ms_now()` function to obtain the current Unix timestamp in milliseconds since the Unix epoch. + +For example: + +```rhai +fn supergraph_service(service) { + let now = unix_ms_now(); +} +``` + +By [@shaikatzz](https://github.com/shaikatzz ) in https://github.com/apollographql/router/pull/5181 + +## ๐Ÿ› Fixes + +### Improve error message produced when subgraphs responses don't include an expected `content-type` header value ([Issue #5359](https://github.com/apollographql/router/issues/5359)) + +To enhance debuggability when a subgraph response lacks an expected `content-type` header value, the error message now includes additional details. + +Examples: +``` +HTTP fetch failed from 'test': subgraph response contains invalid 'content-type' header value \"application/json,application/json\"; expected content-type: application/json or content-type: application/graphql-response+json +``` + +``` +HTTP fetch failed from 'test': subgraph response does not contain 'content-type' header; expected content-type: application/json or content-type: application/graphql-response+json +``` + +By [@IvanGoncharov](https://github.com/IvanGoncharov) in https://github.com/apollographql/router/pull/5223 + +### Performance improvements for demand control ([PR #5405](https://github.com/apollographql/router/pull/5405)) + +Removes unneeded logic in the hot path for our recently released public preview of [demand control](https://www.apollographql.com/docs/router/executing-operations/demand-control) feature to improve performance. + +By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/5405 + +### Skip hashing the entire schema on every query plan cache lookup ([PR #5374](https://github.com/apollographql/router/pull/5374)) + +This fixes performance issues when looking up query plans for large schemas. + +> [!IMPORTANT] +> If you have enabled [Distributed query plan caching](https://www.apollographql.com/docs/router/configuration/distributed-caching/#distributed-query-plan-caching), this release changes the hashing algorithm used for the cache keys. On account of this, you should anticipate additional cache regeneration cost when updating between these versions while the new hashing algorithm comes into service. + +By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/5374 + +### Optimize GraphQL instruments ([PR #5375](https://github.com/apollographql/router/pull/5375)) + +When processing selectors for GraphQL instruments, heap allocations should be avoided for optimal performance. This change removes Vec allocations that were previously performed per field, yielding significant performance improvements. + +By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/5375 + +### Log metrics overflow as a warning rather than an error ([Issue #5173](https://github.com/apollographql/router/issues/5173)) + +If a metric has too high a cardinality, the following is displayed as a warning instead of an error: + +`OpenTelemetry metric error occurred: Metrics error: Warning: Maximum data points for metric stream exceeded/ Entry added to overflow` + +By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5287 + +### Add support of `response_context` selectors for error conditions ([PR #5288](https://github.com/apollographql/router/pull/5288)) + +Provides the ability to configure custom instruments. For example: + +```yaml +http.server.request.timeout: + type: counter + value: unit + description: "request in timeout" + unit: request + attributes: + graphql.operation.name: + response_context: operation_name + condition: + eq: + - "request timed out" + - error: reason +``` + +By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5288 + +### Inaccurate `apollo_router_opened_subscriptions` counter ([PR #5363](https://github.com/apollographql/router/pull/5363)) + +Fixes the `apollo_router_opened_subscriptions` counter which previously only incremented. The counter now also decrements. + +By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5363 + +## ๐Ÿ“ƒ Configuration + +## ๐Ÿ›  Maintenance + +### Skip GraphOS tests when Apollo key not present ([PR #5362](https://github.com/apollographql/router/pull/5362)) + +Some tests require `APOLLO_KEY` and `APOLLO_GRAPH_REF` to execute successfully. +These are now skipped if these env variables are not present allowing external contributors to the router to successfully run the entire test suite. + +By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/5362 + +## ๐Ÿ“š Documentation + +### Standard instrument configuration documentation for subgraphs ([PR #5422](https://github.com/apollographql/router/pull/5422)) + +Added documentation about standard instruments available at the subgraph service level: + + * `http.client.request.body.size` - A histogram of request body sizes for requests handled by subgraphs. + * `http.client.request.duration` - A histogram of request durations for requests handled by subgraphs. + * `http.client.response.body.size` - A histogram of response body sizes for requests handled by subgraphs. + + +These instruments are configurable in `router.yaml`: + +```yaml title="router.yaml" +telemetry: + instrumentation: + instruments: + subgraph: + http.client.request.body.size: true # (default false) + http.client.request.duration: true # (default false) + http.client.response.body.size: true # (default false) +``` + +By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5422 + +### Update docs frontmatter for consistency and discoverability ([PR #5164](https://github.com/apollographql/router/pull/5164)) + +Makes title case consistent for page titles and adds subtitles and meta-descriptions are updated for better discoverability. + +By [@Meschreiber](https://github.com/@Meschreiber) in https://github.com/apollographql/router/pull/5164 + +## ๐Ÿงช Experimental + +### Warm query plan cache using persisted queries on startup ([Issue #5334](https://github.com/apollographql/router/issues/5334)) + +Adds support for the router to use [persisted queries](https://www.apollographql.com/docs/graphos/operations/persisted-queries/) to warm the query plan cache upon startup using a new `experimental_prewarm_query_plan_cache` configuration option under `persisted_queries`. + +To enable: + +```yml +persisted_queries: + enabled: true + experimental_prewarm_query_plan_cache: true +``` + +By [@lleadbet](https://github.com/lleadbet) in https://github.com/apollographql/router/pull/5340 + +### Apollo reporting signature enhancements ([PR #5062](https://github.com/apollographql/router/pull/5061)) + +Adds a new experimental configuration option to turn on some enhancements for the Apollo reporting stats report key: +* Signatures will include the full normalized form of input objects +* Signatures will include aliases +* Some small normalization improvements + +This new configuration (telemetry.apollo.experimental_apollo_signature_normalization_algorithm) only works when in `experimental_apollo_metrics_generation_mode: new` mode and we don't yet recommend enabling it while we continue to verify that the new functionality works as expected. + +By [@bonnici](https://github.com/bonnici) in https://github.com/apollographql/router/pull/5062 + +### Add experimental support for sending traces to Studio via OTLP ([PR #4982](https://github.com/apollographql/router/pull/4982)) + +As the ecosystem around OpenTelemetry (OTel) has been expanding rapidly, we are evaluating a migration of Apollo's internal +tracing system to use an OTel-based protocol. + +In the short-term, benefits include: + +- A comprehensive way to visualize the router execution path in GraphOS Studio. +- Additional spans that were previously not included in Studio traces, such as query parsing, planning, execution, and more. +- Additional metadata such as subgraph fetch details, router idle / busy timing, and more. + +Long-term, we see this as a strategic enhancement to consolidate these two disparate tracing systems. +This will pave the way for future enhancements to more easily plug into the Studio trace visualizer. + +#### Configuration + +This change adds a new configuration option `experimental_otlp_tracing_sampler`. This can be used to send +a percentage of traces via OTLP instead of the native Apollo Usage Reporting protocol. Supported values: + +- `always_off` (default): send all traces via Apollo Usage Reporting protocol. +- `always_on`: send all traces via OTLP. +- `0.0 - 1.0`: the ratio of traces to send via OTLP (0.5 = 50 / 50). + +Note that this sampler is only applied _after_ the common tracing sampler, for example: + +#### Sample 1% of traces, send all traces via OTLP: + +```yaml +telemetry: + apollo: + # Send all traces via OTLP + experimental_otlp_tracing_sampler: always_on + + exporters: + tracing: + common: + # Sample traces at 1% of all traffic + sampler: 0.01 +``` + +by [@timbotnik](https://github.com/timbotnik) in https://github.com/apollographql/router/pull/4982 + +### Set Apollo metrics generation mode to `new` by default ([PR #5265](https://github.com/apollographql/router/pull/5265)) + +Changes the default value of `experimental_apollo_metrics_generation_mode` to +`new`. All metrics are showing that identical signatures are being generated in +this mode. + +By [@bonnici](https://github.com/bonnici) in https://github.com/apollographql/router/pull/5265 + # [1.48.1] - 2024-06-10 ## ๐Ÿ› Fixes diff --git a/Cargo.lock b/Cargo.lock index bee92c422a..e805419d2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "apollo-federation" -version = "1.49.0-rc.1" +version = "1.49.0" dependencies = [ "apollo-compiler", "derive_more", @@ -266,7 +266,7 @@ dependencies = [ [[package]] name = "apollo-router" -version = "1.49.0-rc.1" +version = "1.49.0" dependencies = [ "access-json", "anyhow", @@ -430,7 +430,7 @@ dependencies = [ [[package]] name = "apollo-router-benchmarks" -version = "1.49.0-rc.1" +version = "1.49.0" dependencies = [ "apollo-parser", "apollo-router", @@ -446,7 +446,7 @@ dependencies = [ [[package]] name = "apollo-router-scaffold" -version = "1.49.0-rc.1" +version = "1.49.0" dependencies = [ "anyhow", "cargo-scaffold", diff --git a/apollo-federation/Cargo.toml b/apollo-federation/Cargo.toml index a24f1b0b0d..cd8a96d589 100644 --- a/apollo-federation/Cargo.toml +++ b/apollo-federation/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-federation" -version = "1.49.0-rc.1" +version = "1.49.0" authors = ["The Apollo GraphQL Contributors"] edition = "2021" description = "Apollo Federation" diff --git a/apollo-router-benchmarks/Cargo.toml b/apollo-router-benchmarks/Cargo.toml index 8aff17bc1b..864efb034f 100644 --- a/apollo-router-benchmarks/Cargo.toml +++ b/apollo-router-benchmarks/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-router-benchmarks" -version = "1.49.0-rc.1" +version = "1.49.0" authors = ["Apollo Graph, Inc. "] edition = "2021" license = "Elastic-2.0" diff --git a/apollo-router-scaffold/Cargo.toml b/apollo-router-scaffold/Cargo.toml index 86694809cd..28fa0c1836 100644 --- a/apollo-router-scaffold/Cargo.toml +++ b/apollo-router-scaffold/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-router-scaffold" -version = "1.49.0-rc.1" +version = "1.49.0" authors = ["Apollo Graph, Inc. "] edition = "2021" license = "Elastic-2.0" diff --git a/apollo-router-scaffold/templates/base/Cargo.toml b/apollo-router-scaffold/templates/base/Cargo.toml index 95de0477c1..0feda7063a 100644 --- a/apollo-router-scaffold/templates/base/Cargo.toml +++ b/apollo-router-scaffold/templates/base/Cargo.toml @@ -22,7 +22,7 @@ apollo-router = { path ="{{integration_test}}apollo-router" } apollo-router = { git="https://github.com/apollographql/router.git", branch="{{branch}}" } {{else}} # Note if you update these dependencies then also update xtask/Cargo.toml -apollo-router = "1.49.0-rc.1" +apollo-router = "1.49.0" {{/if}} {{/if}} async-trait = "0.1.52" diff --git a/apollo-router-scaffold/templates/base/xtask/Cargo.toml b/apollo-router-scaffold/templates/base/xtask/Cargo.toml index 6614f941dd..b9783bbaec 100644 --- a/apollo-router-scaffold/templates/base/xtask/Cargo.toml +++ b/apollo-router-scaffold/templates/base/xtask/Cargo.toml @@ -13,7 +13,7 @@ apollo-router-scaffold = { path ="{{integration_test}}apollo-router-scaffold" } {{#if branch}} apollo-router-scaffold = { git="https://github.com/apollographql/router.git", branch="{{branch}}" } {{else}} -apollo-router-scaffold = { git = "https://github.com/apollographql/router.git", tag = "v1.49.0-rc.1" } +apollo-router-scaffold = { git = "https://github.com/apollographql/router.git", tag = "v1.49.0" } {{/if}} {{/if}} anyhow = "1.0.58" diff --git a/apollo-router/Cargo.toml b/apollo-router/Cargo.toml index b296382eaa..c9380066a9 100644 --- a/apollo-router/Cargo.toml +++ b/apollo-router/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-router" -version = "1.49.0-rc.1" +version = "1.49.0" authors = ["Apollo Graph, Inc. "] repository = "https://github.com/apollographql/router/" documentation = "https://docs.rs/apollo-router" @@ -68,7 +68,7 @@ askama = "0.12.1" access-json = "0.1.0" anyhow = "1.0.80" apollo-compiler.workspace = true -apollo-federation = { path = "../apollo-federation", version = "=1.49.0-rc.1"} +apollo-federation = { path = "../apollo-federation", version = "=1.49.0" } arc-swap = "1.6.0" async-channel = "1.9.0" async-compression = { version = "0.4.6", features = [ diff --git a/dockerfiles/tracing/docker-compose.datadog.yml b/dockerfiles/tracing/docker-compose.datadog.yml index 7fa6d3615b..999915330f 100644 --- a/dockerfiles/tracing/docker-compose.datadog.yml +++ b/dockerfiles/tracing/docker-compose.datadog.yml @@ -3,7 +3,7 @@ services: apollo-router: container_name: apollo-router - image: ghcr.io/apollographql/router:v1.49.0-rc.1 + image: ghcr.io/apollographql/router:v1.49.0 volumes: - ./supergraph.graphql:/etc/config/supergraph.graphql - ./router/datadog.router.yaml:/etc/config/configuration.yaml diff --git a/dockerfiles/tracing/docker-compose.jaeger.yml b/dockerfiles/tracing/docker-compose.jaeger.yml index d904a4e6de..666e2ba717 100644 --- a/dockerfiles/tracing/docker-compose.jaeger.yml +++ b/dockerfiles/tracing/docker-compose.jaeger.yml @@ -4,7 +4,7 @@ services: apollo-router: container_name: apollo-router #build: ./router - image: ghcr.io/apollographql/router:v1.49.0-rc.1 + image: ghcr.io/apollographql/router:v1.49.0 volumes: - ./supergraph.graphql:/etc/config/supergraph.graphql - ./router/jaeger.router.yaml:/etc/config/configuration.yaml diff --git a/dockerfiles/tracing/docker-compose.zipkin.yml b/dockerfiles/tracing/docker-compose.zipkin.yml index 9efe97f40b..62da0a2de4 100644 --- a/dockerfiles/tracing/docker-compose.zipkin.yml +++ b/dockerfiles/tracing/docker-compose.zipkin.yml @@ -4,7 +4,7 @@ services: apollo-router: container_name: apollo-router build: ./router - image: ghcr.io/apollographql/router:v1.49.0-rc.1 + image: ghcr.io/apollographql/router:v1.49.0 volumes: - ./supergraph.graphql:/etc/config/supergraph.graphql - ./router/zipkin.router.yaml:/etc/config/configuration.yaml diff --git a/helm/chart/router/Chart.yaml b/helm/chart/router/Chart.yaml index 4d0bad4031..d0614aaacc 100644 --- a/helm/chart/router/Chart.yaml +++ b/helm/chart/router/Chart.yaml @@ -20,10 +20,10 @@ type: application # so it matches the shape of our release process and release automation. # By proxy of that decision, this version uses SemVer 2.0.0, though the prefix # of "v" is not included. -version: 1.49.0-rc.1 +version: 1.49.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v1.49.0-rc.1" +appVersion: "v1.49.0" diff --git a/helm/chart/router/README.md b/helm/chart/router/README.md index ad9ccc1d21..a714a8222e 100644 --- a/helm/chart/router/README.md +++ b/helm/chart/router/README.md @@ -2,7 +2,7 @@ [router](https://github.com/apollographql/router) Rust Graph Routing runtime for Apollo Federation -![Version: 1.49.0-rc.1](https://img.shields.io/badge/Version-1.49.0--rc.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.49.0-rc.1](https://img.shields.io/badge/AppVersion-v1.49.0--rc.1-informational?style=flat-square) +![Version: 1.49.0](https://img.shields.io/badge/Version-1.49.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.49.0](https://img.shields.io/badge/AppVersion-v1.49.0-informational?style=flat-square) ## Prerequisites @@ -11,7 +11,7 @@ ## Get Repo Info ```console -helm pull oci://ghcr.io/apollographql/helm-charts/router --version 1.49.0-rc.1 +helm pull oci://ghcr.io/apollographql/helm-charts/router --version 1.49.0 ``` ## Install Chart @@ -19,7 +19,7 @@ helm pull oci://ghcr.io/apollographql/helm-charts/router --version 1.49.0-rc.1 **Important:** only helm3 is supported ```console -helm upgrade --install [RELEASE_NAME] oci://ghcr.io/apollographql/helm-charts/router --version 1.49.0-rc.1 --values my-values.yaml +helm upgrade --install [RELEASE_NAME] oci://ghcr.io/apollographql/helm-charts/router --version 1.49.0 --values my-values.yaml ``` _See [configuration](#configuration) below._ diff --git a/scripts/install.sh b/scripts/install.sh index 9927578a75..03d5d87e60 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -11,7 +11,7 @@ BINARY_DOWNLOAD_PREFIX="https://github.com/apollographql/router/releases/downloa # Router version defined in apollo-router's Cargo.toml # Note: Change this line manually during the release steps. -PACKAGE_VERSION="v1.49.0-rc.1" +PACKAGE_VERSION="v1.49.0" download_binary() { downloader --check