diff --git a/packages/apollo-engine-reporting/src/agent.ts b/packages/apollo-engine-reporting/src/agent.ts index 5173b19e898..9e360846e8b 100644 --- a/packages/apollo-engine-reporting/src/agent.ts +++ b/packages/apollo-engine-reporting/src/agent.ts @@ -61,10 +61,10 @@ export function getEngineApiKey( const apiKeyFromEnv = process.env.APOLLO_KEY; if(legacyApiKeyFromEnv && apiKeyFromEnv && !skipWarn) { - logger.warn(`Both ENGINE_API_KEY (deprecated) and APOLLO_KEY are set; defaulting to APOLLO_KEY.`); + logger.warn("Using `APOLLO_KEY` since `ENGINE_API_KEY` (deprecated) is also set in the environment."); } if(legacyApiKeyFromEnv && !warnedOnDeprecatedApiKey && !skipWarn) { - logger.warn(`[deprecated] Setting the key via ENGINE_API_KEY is deprecated and will not be supported in future versions.`); + logger.warn("[deprecated] The `ENGINE_API_KEY` environment variable has been renamed to `APOLLO_KEY`."); warnedOnDeprecatedApiKey = true; } return apiKeyFromEnv || legacyApiKeyFromEnv || '' @@ -79,15 +79,15 @@ export function getEngineGraphVariant(engine: EngineReportingOptions | bool throw new Error('Cannot set both engine.graphVariant and engine.schemaTag. Please use engine.graphVariant.'); } if (engine.schemaTag) { - logger.warn('[Deprecation warning] Usage of engine.schemaTag is deprecated. Please use engine.graphVariant instead.'); + logger.warn('[deprecated] The `schemaTag` property within `engine` configuration has been renamed to `graphVariant`.'); } return engine.graphVariant || engine.schemaTag; } else { if (process.env.ENGINE_SCHEMA_TAG) { - logger.warn('[Deprecation warning] Usage of ENGINE_SCHEMA_TAG is deprecated. Please use APOLLO_GRAPH_VARIANT instead.'); + logger.warn('[deprecated] The `ENGINE_SCHEMA_TAG` environment variable has been renamed to `APOLLO_GRAPH_VARIANT`.'); } if (process.env.ENGINE_SCHEMA_TAG && process.env.APOLLO_GRAPH_VARIANT) { - throw new Error('Cannot set both ENGINE_SCHEMA_TAG and APOLLO_GRAPH_VARIANT. Please use APOLLO_GRAPH_VARIANT.') + throw new Error('`APOLLO_GRAPH_VARIANT` and `ENGINE_SCHEMA_TAG` (deprecated) environment variables must not both be set.') } return process.env.APOLLO_GRAPH_VARIANT || process.env.ENGINE_SCHEMA_TAG; }