Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 10 additions & 0 deletions .changesets/config_rreg_subgraph_insights_config_preview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### [Subgraph Insights] Subgraph metrics config flag now in preview ([PR #8200](https://github.com/apollographql/router/pull/8200))
The `subgraph_metrics` config flag which powers the Studio `Subgraph Insights` feature is being promoted from `experimental` to `preview`.
The flag name has been updated from `experimental_subgraph_metrics` to
```yaml
telemetry:
apollo:
preview_subgraph_metrics: true
```

By [@rregitsky](https://github.com/rregitsky) in https://github.com/apollographql/router/pull/8200
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Subgraph metrics are now in preview
actions:
- type: move
from: telemetry.apollo.experimental_subgraph_metrics
to: telemetry.apollo.preview_subgraph_metrics
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: apollo-router/src/configuration/tests.rs
expression: "&schema"
snapshot_kind: text
---
{
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down Expand Up @@ -1511,11 +1512,6 @@ expression: "&schema"
"$ref": "#/definitions/Protocol",
"description": "#/definitions/Protocol"
},
"experimental_subgraph_metrics": {
"default": false,
"description": "Enable sending additional subgraph metrics to Apollo Studio via OTLP",
"type": "boolean"
},
"field_level_instrumentation_sampler": {
"$ref": "#/definitions/SamplerOption",
"description": "#/definitions/SamplerOption"
Expand All @@ -1528,6 +1524,11 @@ expression: "&schema"
"$ref": "#/definitions/SamplerOption",
"description": "#/definitions/SamplerOption"
},
"preview_subgraph_metrics": {
"default": false,
"description": "Enable sending additional subgraph metrics to Apollo Studio via OTLP",
"type": "boolean"
},
"send_headers": {
"$ref": "#/definitions/ForwardHeaders",
"description": "#/definitions/ForwardHeaders"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
source: apollo-router/src/configuration/tests.rs
expression: new_config
snapshot_kind: text
---
---
telemetry:
apollo:
preview_subgraph_metrics: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
telemetry:
apollo:
experimental_subgraph_metrics: true
4 changes: 2 additions & 2 deletions apollo-router/src/plugins/telemetry/apollo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub(crate) struct Config {
pub(crate) experimental_local_field_metrics: bool,

/// Enable sending additional subgraph metrics to Apollo Studio via OTLP
pub(crate) experimental_subgraph_metrics: bool,
pub(crate) preview_subgraph_metrics: bool,
}

#[derive(Debug, Clone, Deserialize, JsonSchema, Default)]
Expand Down Expand Up @@ -256,7 +256,7 @@ impl Default for Config {
signature_normalization_algorithm: ApolloSignatureNormalizationAlgorithm::default(),
experimental_local_field_metrics: false,
metrics_reference_mode: ApolloMetricsReferenceMode::default(),
experimental_subgraph_metrics: false,
preview_subgraph_metrics: false,
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl ApolloSubgraphInstruments {
let attribute_count = selectors.custom.len() + 1; // 1 for subgraph_name on attributes

let apollo_router_operations_fetch_duration =
apollo_config.experimental_subgraph_metrics.then(|| {
apollo_config.preview_subgraph_metrics.then(|| {
CustomHistogram::builder()
.increment(Increment::Duration(Instant::now()))
.attributes(Vec::with_capacity(attribute_count))
Expand Down Expand Up @@ -236,7 +236,7 @@ impl ApolloConnectorInstruments {
let attribute_count = selectors.custom.len() + 1; // 1 for subgraph_name on attributes

let apollo_router_operations_fetch_duration =
apollo_config.experimental_subgraph_metrics.then(|| {
apollo_config.preview_subgraph_metrics.then(|| {
CustomHistogram::builder()
.increment(Increment::Duration(Instant::now()))
.attributes(Vec::with_capacity(attribute_count))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: "&metrics.all()"
info:
telemetry:
apollo:
experimental_subgraph_metrics: true
preview_subgraph_metrics: true
instrumentation:
instruments:
connector:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
telemetry:
apollo:
experimental_subgraph_metrics: true
preview_subgraph_metrics: true
instrumentation:
instruments:
connector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: "&metrics.all()"
info:
telemetry:
apollo:
experimental_subgraph_metrics: true
preview_subgraph_metrics: true
instrumentation:
instruments:
subgraph:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
telemetry:
apollo:
experimental_subgraph_metrics: true
preview_subgraph_metrics: true
instrumentation:
instruments:
subgraph:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ async fn test_subgraph_request_emits_histogram() {
experimental_otlp_metrics_protocol: http
batch_processor:
scheduled_delay: 10ms
experimental_subgraph_metrics: true
preview_subgraph_metrics: true
include_subgraph_errors:
all: true
"#,
Expand Down Expand Up @@ -652,7 +652,7 @@ async fn test_failed_subgraph_request_emits_histogram() {
experimental_otlp_metrics_protocol: http
batch_processor:
scheduled_delay: 10ms
experimental_subgraph_metrics: true
preview_subgraph_metrics: true
include_subgraph_errors:
all: true
"#,
Expand Down Expand Up @@ -713,7 +713,7 @@ async fn test_connector_request_emits_histogram() {
experimental_otlp_metrics_protocol: http
batch_processor:
scheduled_delay: 10ms
experimental_subgraph_metrics: true
preview_subgraph_metrics: true
include_subgraph_errors:
all: true
"#,
Expand Down Expand Up @@ -787,7 +787,7 @@ async fn test_failed_connector_request_emits_histogram() {
experimental_otlp_metrics_protocol: http
batch_processor:
scheduled_delay: 10ms
experimental_subgraph_metrics: true
preview_subgraph_metrics: true
traffic_shaping:
connector:
sources:
Expand Down