From 32451f96e743017bc569d6bceefa1ff8b0c5e55a Mon Sep 17 00:00:00 2001 From: Bryn Cooke Date: Tue, 22 Aug 2023 16:29:58 +0100 Subject: [PATCH] Update Apollo OTLP endpoint and improve debug messages a little. (#3641) Update Apollo OTLP endpoint to the final prod value **Checklist** Complete the checklist (and note appropriate exceptions) before a final PR is raised. - [ ] 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. - please raise a separate issue to automate the test and label it (or ask for it to be labeled) as `manual test` --------- Co-authored-by: bryn --- ...pollo_router__configuration__tests__schema_generation.snap | 2 +- apollo-router/src/plugins/telemetry/apollo.rs | 2 +- apollo-router/src/plugins/telemetry/metrics/apollo.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apollo-router/src/configuration/snapshots/apollo_router__configuration__tests__schema_generation.snap b/apollo-router/src/configuration/snapshots/apollo_router__configuration__tests__schema_generation.snap index 5d9bab1612..8494a136a4 100644 --- a/apollo-router/src/configuration/snapshots/apollo_router__configuration__tests__schema_generation.snap +++ b/apollo-router/src/configuration/snapshots/apollo_router__configuration__tests__schema_generation.snap @@ -2054,7 +2054,7 @@ expression: "&schema" }, "experimental_otlp_endpoint": { "description": "The Apollo Studio endpoint for exporting traces and metrics.", - "default": "http://0.0.0.0:4317/", + "default": "https://usage-reporting.api.apollographql.com/", "type": "string" }, "field_level_instrumentation_sampler": { diff --git a/apollo-router/src/plugins/telemetry/apollo.rs b/apollo-router/src/plugins/telemetry/apollo.rs index 258e4086fc..d7dc789d55 100644 --- a/apollo-router/src/plugins/telemetry/apollo.rs +++ b/apollo-router/src/plugins/telemetry/apollo.rs @@ -33,7 +33,7 @@ use crate::services::apollo_key; pub(crate) const ENDPOINT_DEFAULT: &str = "https://usage-reporting.api.apollographql.com/api/ingress/traces"; -pub(crate) const OTLP_ENDPOINT_DEFAULT: &str = "http://0.0.0.0:4317"; +pub(crate) const OTLP_ENDPOINT_DEFAULT: &str = "https://usage-reporting.api.apollographql.com"; #[derive(Derivative)] #[derivative(Debug)] diff --git a/apollo-router/src/plugins/telemetry/metrics/apollo.rs b/apollo-router/src/plugins/telemetry/metrics/apollo.rs index 32d1846e4d..9ab7e79ea4 100644 --- a/apollo-router/src/plugins/telemetry/metrics/apollo.rs +++ b/apollo-router/src/plugins/telemetry/metrics/apollo.rs @@ -94,7 +94,7 @@ impl Config { schema_id: &str, batch_processor: &BatchProcessorConfig, ) -> Result { - tracing::debug!("creating otlp metrics exporter"); + tracing::debug!(endpoint = %endpoint, "creating Apollo OTLP metrics exporter"); let mut metadata = MetadataMap::new(); metadata.insert("apollo.api.key", key.parse()?); @@ -142,7 +142,7 @@ impl Config { batch_processor: &BatchProcessorConfig, ) -> Result { let batch_processor_config = batch_processor; - tracing::debug!("creating metrics exporter"); + tracing::debug!(endpoint = %endpoint, "creating Apollo metrics exporter"); let exporter = ApolloExporter::new(endpoint, batch_processor_config, key, reference, schema_id)?;