Skip to content

Commit

Permalink
Merge branch 'dev' into trevor/unpin-apollo-compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-scheer committed Sep 9, 2024
2 parents 0e575d1 + 29bf3a4 commit 9d234c3
Show file tree
Hide file tree
Showing 137 changed files with 5,874 additions and 3,123 deletions.
10 changes: 10 additions & 0 deletions .changesets/config_apollo_telemetry_config_rename.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### Remove experimental label from apollo usage reporting configs ([#5807](https://github.com/apollographql/router/pull/5807))

All known issues related to the new Apollo usage report generation have been resolved so we are renaming some experimental options to be non-experimental.
* `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 since the Rust implementation has been the default since v1.49.0 and it is generating reports identical to the router-bridge implementation

Previous configuration will warn but still work.

By [@bonnici](https://github.com/bonnici) in https://github.com/apollographql/router/pull/5807
7 changes: 7 additions & 0 deletions .changesets/config_musket_minute_linen_kitchen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Include hostname on heaptrack path, specify pod lifecycle ([Issue #5789](https://github.com/apollographql/router/issues/5789))

Use hostname in the heaptrack path to identify an individual container/instance/machine where the router is running. This means the filepath for heaptrack output will change.

Additionally, allow the specification of restartPolicy on deployment (defaults to `Always` which is kubernetes default)

By [@cyberhck](https://github.com/cyberhck) in https://github.com/apollographql/router/pull/5850
5 changes: 5 additions & 0 deletions .changesets/docs_feature_operationlimitsotel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Add OTEL information for operation limits ([PR #5884](https://github.com/apollographql/router/pull/5884))

Add OTEL (OpenTelemetry) information for operation limits to docs.

By [@andrewmcgivery](https://github.com/andrewmcgivery) in https://github.com/apollographql/router/pull/5884
39 changes: 39 additions & 0 deletions .changesets/feat_bnjjj_feat_5540.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
### 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
20 changes: 20 additions & 0 deletions .changesets/feat_bnjjj_fix_5930.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Add ability to alias standard attributes for telemetry ([Issue #5930](https://github.com/apollographql/router/issues/5930))

There is an issue when using standard attributes (on cache for example) because on new relic `entity.type` is a reserved attribute name and so it won’t work properly. cf [Learn about New Relic entities](https://docs.newrelic.com/docs/new-relic-solutions/new-relic-one/core-concepts/what-entity-new-relic/#reserved-attributes) Moreover `entity.type` is not consistent with our other graphql attributes (prefixed by `graphql.`). So we rename `entity.type` attribute to `graphql.type.name`.

In order to make it work and that could also answer other use cases that would be great if we can alias the name of a standard attribute like this:

```yaml
telemetry:
instrumentation:
spans:
mode: spec_compliant # Docs state this significantly improves performance: https://www.apollographql.com/docs/router/configuration/telemetry/instrumentation/spans#spec_compliant
instruments:
cache: # Cache instruments configuration
apollo.router.operations.entity.cache: # A counter which counts the number of cache hit and miss for subgraph requests
attributes:
graphql.type.name:
alias: entity_type # ENABLED and aliased to entity_type
```
By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5957
6 changes: 6 additions & 0 deletions .changesets/feat_geal_evaluate_plan_count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Add a histogram metric tracking evaluated query plans ([PR #5875](https://github.com/apollographql/router/pull/5875))

The `supergraph.query_planning.experimental_plans_limit` option can be used to limit the number of query plans evaluated for a query, to reduce the time spent planning. When reaching that limit, the planner would still return a valid query plan, but maybe the most optimized one.
This adds the `apollo.router.query_planning.plan.evaluated_plans` histogram metric to track the number of evaluated query plans, giving more context to configure this option.

By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/5875
5 changes: 5 additions & 0 deletions .changesets/feat_geal_implement_redis_connection_pooling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Support Redis connection pooling ([PR #5942](https://github.com/apollographql/router/pull/5942))

This implements Redis connection pooling, for APQ, query planner and entity cache Redis usage. This can improve performance when there is some contention on the Redis connection, or some latency in Redis calls.

By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/5942
5 changes: 5 additions & 0 deletions .changesets/fix_bryn_test_propagation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Datadog sampling fix ([PR #5788](https://github.com/apollographql/router/pull/5788))

This PR ensures that datadog context is set, this may help with undersampling issues that users are seeing.

By [@BrynCooke](https://github.com/BrynCooke) & [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/5788
23 changes: 9 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ jobs:
- setup_remote_docker:
# CircleCI Image Policy
# https://circleci.com/docs/remote-docker-images-support-policy/
version: 24.0.9
version: docker23
docker_layer_caching: true
- run:
name: Docker build
Expand Down Expand Up @@ -1102,10 +1102,6 @@ workflows:
tags:
only: /v.*/
- test_updated:
requires:
- lint
- check_helm
- check_compliance
matrix:
parameters:
platform:
Expand All @@ -1116,10 +1112,6 @@ workflows:
tags:
only: /v.*/
- test:
requires:
- lint
- check_helm
- check_compliance
matrix:
parameters:
platform:
Expand All @@ -1130,10 +1122,6 @@ workflows:
tags:
only: /v.*/
- build_release:
requires:
- pre_verify_release
- test
- test_updated
matrix:
parameters:
platform:
Expand All @@ -1144,7 +1132,14 @@ workflows:
tags:
only: /v.*/
- publish_github_release:
requires: [ build_release ]
requires:
- build_release
- lint
- check_helm
- check_compliance
- pre_verify_release
- test
- test_updated
filters:
branches:
ignore: /.*/
Expand Down
30 changes: 30 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,27 @@ or ( binary_id(=apollo-router) & test(=axum_factory::tests::response_with_custom
or ( binary_id(=apollo-router) & test(=axum_factory::tests::response_with_custom_endpoint_wildcard) )
or ( binary_id(=apollo-router) & test(=axum_factory::tests::response_with_custom_prefix_endpoint) )
or ( binary_id(=apollo-router) & test(=axum_factory::tests::response_with_root_wildcard) )
or ( binary_id(=apollo-router) & test(=layers::map_first_graphql_response::tests::test_map_first_graphql_response) )
or ( binary_id(=apollo-router) & test(=notification::tests::it_test_ttl) )
or ( binary_id(=apollo-router) & test(=plugins::authentication::subgraph::test::test_credentials_provider_refresh_on_stale) )
or ( binary_id(=apollo-router) & test(=plugins::expose_query_plan::tests::it_expose_query_plan) )
or ( binary_id(=apollo-router) & test(=plugins::include_subgraph_errors::test::it_does_not_redact_all_explicit_allow_account_explict_redact_for_product_query) )
or ( binary_id(=apollo-router) & test(=plugins::include_subgraph_errors::test::it_does_not_redact_all_explicit_allow_review_explict_redact_for_product_query) )
or ( binary_id(=apollo-router) & test(=plugins::include_subgraph_errors::test::it_does_not_redact_all_implicit_redact_product_explict_allow_for_product_query) )
or ( binary_id(=apollo-router) & test(=plugins::include_subgraph_errors::test::it_does_redact_all_explicit_allow_account_explict_redact_for_account_query) )
or ( binary_id(=apollo-router) & test(=plugins::include_subgraph_errors::test::it_does_redact_all_explicit_allow_product_explict_redact_for_product_query) )
or ( binary_id(=apollo-router) & test(=plugins::include_subgraph_errors::test::it_redacts_all_subgraphs_implicit_redact) )
or ( binary_id(=apollo-router) & test(=plugins::include_subgraph_errors::test::it_returns_valid_response) )
or ( binary_id(=apollo-router) & test(=plugins::telemetry::config_new::instruments::tests::test_instruments) )
or ( binary_id(=apollo-router) & test(=plugins::telemetry::metrics::apollo::test::apollo_metrics_enabled) )
or ( binary_id(=apollo-router) & test(=plugins::telemetry::tests::it_test_prometheus_metrics) )
or ( binary_id(=apollo-router) & test(=router::tests::basic_event_stream_test) )
or ( binary_id(=apollo-router) & test(=router::tests::schema_update_test) )
or ( binary_id(=apollo-router) & test(=services::subgraph_service::tests::test_subgraph_service_websocket_with_error) )
or ( binary_id(=apollo-router) & test(=services::supergraph::tests::aliased_subgraph_data_rewrites_on_non_root_fetch) )
or ( binary_id(=apollo-router) & test(=services::supergraph::tests::interface_object_typename_rewrites) )
or ( binary_id(=apollo-router) & test(=services::supergraph::tests::only_query_interface_object_subgraph) )
or ( binary_id(=apollo-router) & test(=uplink::license_stream::test::license_expander_claim_no_claim) )
or ( binary_id(=apollo-router) & test(=uplink::license_stream::test::license_expander_claim_pause_claim) )
or ( binary_id(=apollo-router) & test(=uplink::persisted_queries_manifest_stream::test::integration_test) )
or ( binary_id(=apollo-router) & test(=uplink::schema_stream::test::integration_test) )
Expand Down Expand Up @@ -96,28 +109,44 @@ or ( binary_id(=apollo-router::integration_tests) & test(=integration::lifecycle
or ( binary_id(=apollo-router::integration_tests) & test(=integration::lifecycle::test_reload_config_valid) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::lifecycle::test_reload_config_with_broken_plugin) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::lifecycle::test_reload_config_with_broken_plugin_recovery) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::lifecycle::test_shutdown_with_idle_connection) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::query_planner::progressive_override_with_legacy_qp_reload_to_both_best_effort_keep_previous_config) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::redis::apq) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::redis::connection_failure_blocks_startup) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::redis::entity_cache) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::redis::entity_cache_authorization) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::redis::query_planner_redis_update_defer) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::redis::query_planner_redis_update_introspection) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::redis::query_planner_redis_update_query_fragments) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::redis::query_planner_redis_update_reuse_query_fragments) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::redis::query_planner_redis_update_type_conditional_fetching) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::redis::test::connection_failure_blocks_startup) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::subgraph_response::test_invalid_error_locations_contains_negative_one_location) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::datadog::test_basic) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::datadog::test_resource_mapping_default) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::datadog::test_resource_mapping_override) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::datadog::test_span_metrics) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::datadog::test_with_parent_span) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::jaeger::test_decimal_trace_id) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::jaeger::test_default_operation) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::jaeger::test_local_root) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::jaeger::test_remote_root) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::jaeger::test_selected_operation) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::logging::test_json) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::logging::test_json_promote_span_attributes) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::logging::test_json_sampler_off) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::logging::test_json_uuid_format) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::logging::test_text) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::logging::test_text_sampler_off) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::metrics::test_bad_queries) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::metrics::test_graphql_metrics) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::metrics::test_metrics_bad_query) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::metrics::test_metrics_reloading) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::metrics::test_subgraph_auth_metrics) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::telemetry::propagation::test_trace_id_via_header) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::traffic_shaping::test_router_rate_limit) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::traffic_shaping::test_subgraph_rate_limit) )
or ( binary_id(=apollo-router::integration_tests) & test(=integration::traffic_shaping::test_subgraph_timeout) )
or ( binary_id(=apollo-router::integration_tests) & test(=normal_query_with_defer_accept_header) )
or ( binary_id(=apollo-router::integration_tests) & test(=persisted_queries) )
or ( binary_id(=apollo-router::integration_tests) & test(=queries_should_work_over_get) )
Expand All @@ -129,6 +158,7 @@ or ( binary_id(=apollo-router::samples) & test(=/basic/query1) )
or ( binary_id(=apollo-router::samples) & test(=/basic/query2) )
or ( binary_id(=apollo-router::samples) & test(=/enterprise/entity-cache/invalidation) )
or ( binary_id(=apollo-router::samples) & test(=/enterprise/entity-cache/invalidation-subgraph) )
or ( binary_id(=apollo-router::samples) & test(=/enterprise/entity-cache/invalidation-subgraph-name) )
or ( binary_id(=apollo-router::samples) & test(=/enterprise/entity-cache/invalidation-subgraph-type) )
or ( binary_id(=apollo-router::samples) & test(=/enterprise/query-planning-redis) )
or ( binary_id(=apollo-router::set_context) & test(=test_set_context) )
Expand Down
Loading

0 comments on commit 9d234c3

Please sign in to comment.