Skip to content

Commit

Permalink
Reconcile dev after merge to main for v1.54.0 (#5986)
Browse files Browse the repository at this point in the history
  • Loading branch information
abernix authored Sep 10, 2024
2 parents d4ab58d + 822d3de commit 6227769
Show file tree
Hide file tree
Showing 27 changed files with 291 additions and 1,040 deletions.
10 changes: 0 additions & 10 deletions .changesets/config_apollo_telemetry_config_rename.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changesets/config_musket_minute_linen_kitchen.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changesets/docs_feature_operationlimitsotel.md

This file was deleted.

39 changes: 0 additions & 39 deletions .changesets/feat_bnjjj_feat_5540.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changesets/feat_geal_evaluate_plan_count.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changesets/fix_bryn_test_propagation.md

This file was deleted.

102 changes: 101 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,106 @@ 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.54.0] - 2024-09-10

## 🚀 Features

### Add configurability of span attributes in logs ([Issue #5540](https://github.com/apollographql/router/issues/5540))

The router supports a new `telemetry.exporters.logging.stdout.format.json.span_attributes` option that enables you to choose a subset of all span attributes to display in your logs.

When `span_attributes` is specified, the router searches for the first attribute in its input list of span attributes from the root span to the current span and attaches it to the outermost JSON object for the log event. If you set the same attribute name for different spans at different levels, the router chooses the attributes of child spans before the attributes of parent spans.


For example, if you have spans that contains `span_attr_1` attribute and you only want to display this span attribute:

```yaml title="router.yaml"
telemetry:
exporters:
logging:
stdout:
enabled: true
format:
json:
display_span_list: false
span_attributes:
- span_attr_1
```

Example output with a list of spans:

```json
{
"timestamp": "2023-10-30T14:09:34.771388Z",
"level": "INFO",
"fields": {
"event_attr_1": "event_attr_1",
"event_attr_2": "event_attr_2"
},
"target": "event_target",
"span_attr_1": "span_attr_1"
}
```

To learn more, go to [`span_attributes`](https://www.apollographql.com/docs/router/configuration/telemetry/exporters/logging/stdout#span_attributes) docs.
By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5867

### Add a histogram metric tracking evaluated query plans ([PR #5875](https://github.com/apollographql/router/pull/5875))

The router supports the new `apollo.router.query_planning.plan.evaluated_plans` histogram metric to track the number of evaluated query plans.

You can use it to help set an optimal `supergraph.query_planning.experimental_plans_limit` option that limits the number of query plans evaluated for a query and reduces the time spent planning.


By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/5875

## 🐛 Fixes

### Fix Datadog sampling ([PR #5788](https://github.com/apollographql/router/pull/5788))

The router's Datadog exporter has been fixed so that traces are sampled as intended.

Previously, the Datadog exporter's context may not have been set correctly, causing traces to be undersampled.

By [@BrynCooke](https://github.com/BrynCooke) & [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5788

## 📃 Configuration

### General availability of Apollo usage report generation ([#5807](https://github.com/apollographql/router/pull/5807))

The router's Apollo usage report generation feature that was previously [experimental](https://www.apollographql.com/docs/resources/product-launch-stages/#experimental-features) is now [generally available](https://www.apollographql.com/docs/resources/product-launch-stages/#general-availability).

If you used its experimental configuration, you should migrate to the new configuration options:

* `telemetry.apollo.experimental_apollo_metrics_reference_mode` is now `telemetry.apollo.metrics_reference_mode`
* `telemetry.apollo.experimental_apollo_signature_normalization_algorithm` is now `telemetry.apollo.signature_normalization_algorithm`
* `experimental_apollo_metrics_generation_mode` has been removed because the Rust implementation (the default since router v1.49.0) is generating reports identical to the previous router-bridge implementation

The experimental configuration options are now deprecated. They are functional but will log warnings.

By [@bonnici](https://github.com/bonnici) in https://github.com/apollographql/router/pull/5807

### Helm: Enable easier Kubernetes debugging with heaptrack ([Issue #5789](https://github.com/apollographql/router/issues/5789))

The router's Helm chart has been updated to help make debugging with heaptrack easier.

Previously, when debugging multiple Pods with heaptrack, all Pods wrote to the same file, so they'd overwrite each others' results. This issue has been fixed by adding a `hostname` to each output data file from heaptrack.

Also, the Helm chart now supports a `restartPolicy` that enables you to configure a Pod's [restart policy](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-restarts). The default value of `restartPolicy` is `Always` (the same as the Kubernetes default).


By [@cyberhck](https://github.com/cyberhck) in https://github.com/apollographql/router/pull/5850

## 📚 Documentation

### Document OpenTelemetry information for operation limits ([PR #5884](https://github.com/apollographql/router/pull/5884))

The router's docs for operation limits now describe [using telemetry to set operation limits](https://www.apollographql.com/docs/router/configuration/operation-limits#using-telemetry-to-set-operation-limits) and [logging values](https://www.apollographql.com/docs/router/configuration/operation-limits#logging-values).

By [@andrewmcgivery](https://github.com/andrewmcgivery) in https://github.com/apollographql/router/pull/5884



# [1.53.0] - 2024-08-28

> [!IMPORTANT]
Expand Down Expand Up @@ -58,7 +158,7 @@ By [@tninesling](https://github.com/tninesling) in https://github.com/apollograp

The router now schedules background jobs to run the native (Rust) query planner to compare its results to the legacy implementation. This helps ascertain its correctness before making a decision to switch entirely to it from the legacy query planner.

To learn more, go to [Experimental Query Planner Mode](https://www.apollographql.com/docs/router/configuration/configuration/experimental_query_planner_mode) docs.
To learn more, go to [Experimental Query Planner Mode](https://www.apollographql.com/docs/router/configuration/experimental_query_planner_mode) docs.

The router continues to use the legacy query planner to plan and execute operations, so there is no effect on the hot path.

Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ dependencies = [

[[package]]
name = "apollo-federation"
version = "1.53.0"
version = "1.54.0"
dependencies = [
"apollo-compiler",
"derive_more",
Expand Down Expand Up @@ -229,7 +229,7 @@ dependencies = [

[[package]]
name = "apollo-router"
version = "1.53.0"
version = "1.54.0"
dependencies = [
"access-json",
"ahash",
Expand Down Expand Up @@ -401,7 +401,7 @@ dependencies = [

[[package]]
name = "apollo-router-benchmarks"
version = "1.53.0"
version = "1.54.0"
dependencies = [
"apollo-parser",
"apollo-router",
Expand All @@ -417,7 +417,7 @@ dependencies = [

[[package]]
name = "apollo-router-scaffold"
version = "1.53.0"
version = "1.54.0"
dependencies = [
"anyhow",
"cargo-scaffold",
Expand Down
2 changes: 1 addition & 1 deletion apollo-federation/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-federation"
version = "1.53.0"
version = "1.54.0"
authors = ["The Apollo GraphQL Contributors"]
edition = "2021"
description = "Apollo Federation"
Expand Down
2 changes: 1 addition & 1 deletion apollo-router-benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-router-benchmarks"
version = "1.53.0"
version = "1.54.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
edition = "2021"
license = "Elastic-2.0"
Expand Down
2 changes: 1 addition & 1 deletion apollo-router-scaffold/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-router-scaffold"
version = "1.53.0"
version = "1.54.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
edition = "2021"
license = "Elastic-2.0"
Expand Down
2 changes: 1 addition & 1 deletion apollo-router-scaffold/templates/base/Cargo.template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.53.0"
apollo-router = "1.54.0"
{{/if}}
{{/if}}
async-trait = "0.1.52"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.53.0" }
apollo-router-scaffold = { git = "https://github.com/apollographql/router.git", tag = "v1.54.0" }
{{/if}}
{{/if}}
anyhow = "1.0.58"
Expand Down
4 changes: 2 additions & 2 deletions apollo-router/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-router"
version = "1.53.0"
version = "1.54.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
repository = "https://github.com/apollographql/router/"
documentation = "https://docs.rs/apollo-router"
Expand Down Expand Up @@ -68,7 +68,7 @@ askama = "0.12.1"
access-json = "0.1.0"
anyhow = "1.0.86"
apollo-compiler.workspace = true
apollo-federation = { path = "../apollo-federation", version = "=1.53.0" }
apollo-federation = { path = "../apollo-federation", version = "=1.54.0" }
arc-swap = "1.6.0"
async-channel = "1.9.0"
async-compression = { version = "0.4.6", features = [
Expand Down
2 changes: 1 addition & 1 deletion apollo-router/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Most Apollo Router Core features can be defined using our [YAML configuration](h
If you prefer to write customizations in Rust or need more advanced customizations, see our section on [native customizations](https://www.apollographql.com/docs/router/customizations/native) for information on how to use `apollo-router` as a Rust library. We also publish Rust-specific documentation on our [`apollo-router` crate docs](https://docs.rs/crate/apollo-router).

<!-- renovate-automation: rustc version -->
The minimum supported Rust version (MSRV) for this version of `apollo-router` is **1.72.0**.
The minimum supported Rust version (MSRV) for this version of `apollo-router` is **1.76.0**.
6 changes: 0 additions & 6 deletions apollo-router/src/query_planner/bridge_query_planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,12 +580,6 @@ impl BridgeQueryPlanner {
) -> Result<graphql::Response, QueryPlannerError> {
let schema = self.schema.api_schema();
let operation = doc.get_operation(key.operation_name.as_deref())?;
apollo_compiler::execution::check_introspection_max_depth(&doc.executable, operation)
.map_err(|_e| {
QueryPlannerError::Introspection(IntrospectionError {
message: Some("Maximum introspection depth exceeded".to_owned()),
})
})?;
let variable_values = Default::default();
let variable_values =
apollo_compiler::execution::coerce_variable_values(schema, operation, &variable_values)
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/tracing/docker-compose.datadog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:

apollo-router:
container_name: apollo-router
image: ghcr.io/apollographql/router:v1.53.0
image: ghcr.io/apollographql/router:v1.54.0
volumes:
- ./supergraph.graphql:/etc/config/supergraph.graphql
- ./router/datadog.router.yaml:/etc/config/configuration.yaml
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/tracing/docker-compose.jaeger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
apollo-router:
container_name: apollo-router
#build: ./router
image: ghcr.io/apollographql/router:v1.53.0
image: ghcr.io/apollographql/router:v1.54.0
volumes:
- ./supergraph.graphql:/etc/config/supergraph.graphql
- ./router/jaeger.router.yaml:/etc/config/configuration.yaml
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/tracing/docker-compose.zipkin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
apollo-router:
container_name: apollo-router
build: ./router
image: ghcr.io/apollographql/router:v1.53.0
image: ghcr.io/apollographql/router:v1.54.0
volumes:
- ./supergraph.graphql:/etc/config/supergraph.graphql
- ./router/zipkin.router.yaml:/etc/config/configuration.yaml
Expand Down
6 changes: 2 additions & 4 deletions docs/source/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
"Demand Control" : [
"/executing-operations/demand-control",
[
"enterprise",
"preview"
"enterprise"
]
],
"Privacy and Data Collection": "/privacy"
Expand All @@ -68,8 +67,7 @@
["enterprise", "preview"]
],
"Client Protocol: HTTP Multipart": ["/executing-operations/subscription-multipart-protocol", ["enterprise"]]
},
"Demand Control": ["/executing-operations/demand-control", ["enterprise", "preview"]]
}
},
"Telemetry and Monitoring": {
"Overview": "/configuration/telemetry/overview",
Expand Down
Loading

0 comments on commit 6227769

Please sign in to comment.