Partially upgrade instrumentation telemetry from v1 to v2#3827
Conversation
Co-authored-by: Thomas Hunter II <[email protected]>
Co-authored-by: Thomas Hunter II <[email protected]>
…js into instel_partial_upgrade
|
Please note that there are differences in the telemetry logs v1 and v2 schemas. In the v1, the payload is an array of log objects and in the v2 the payload is an object with a I don't know what would happen if we keep sending the old schema to the v2 api... |
| logCollection: isTrue(DD_TELEMETRY_LOG_COLLECTION_ENABLED), | ||
| metrics: isTrue(DD_TELEMETRY_METRICS_ENABLED) | ||
| metrics: isTrue(DD_TELEMETRY_METRICS_ENABLED), | ||
| dependencyCollection: DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED |
There was a problem hiding this comment.
Just to clarify cause this question came up with Ruby; if DD_INSTRUMENTATION_TELEMETRY_ENABLED=false, none of the other DD_TELEMETRY flags should trigger any sort of telemetry collection even if they are true.
| if (agentError) { | ||
| warn('DATADOG TRACER DIAGNOSTIC - Agent Error: ' + agentError.message) | ||
| errors.agentError = { | ||
| code: agentError.code ? agentError.code : '', |
There was a problem hiding this comment.
What are the agent error codes based on? Does it follow the descriptions on this sheet?
There was a problem hiding this comment.
it probably doesnt. so I'll remove it for now since it's optional, will try to add it in later
| const app = { | ||
| products: getProducts(config), | ||
| configuration: flatten(config), | ||
| additional_payload: [] |
There was a problem hiding this comment.
we've pretty much deprecated additional_payload and we don't do anything with the data, I think you should be able to just delete it from here if you're not using it either
* adding required headers for in tel * adding required headers for in tel * updating version in unit tests * updating version in unit tests * app_started- extended_heartbeat- header- * updating heartbeat and adding extendedheartbeat * updating telemetry to v2 * worked on addressing telemetry uniform heartbeat * added some tests for instel v2 * cleaned up instel tests * adding dependencies variable check & tests * change to capture initial load for dependencies * Initial retry logic for telemetry * fixing heartbeat tests * adding in extended heartbeat * Cleaned up Index and send data * fixed syntax on telemetry tests * Added extended heartbeat logic * updated app-heartbeat test * modified config file for app-started * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * fix app-dependencies-loaded * modified config file to support telemetry app-started * modified config file for telemetry * modified config file to report tracer config values to telemetry * finished updating telemetry event app-started from v1 to v2 * fixed config file * fixed lint errors * attempt to remove yarn.lock changes * fixed telemetry settimeout bug * removed config file changes for now * reverted changes in config.spec.js * fixed bugs * disabled telemetry app-heartbeat test for now * added in origin field for telemetry app-started config * only send integrations through telemetry when there are integrations to be sent * only send integrations through telemetry when there are integrations to be sent * corrected telemetry event name * added back missing telemetry config value * added commit to skip telemetry heartbeat test for now * fixed telemetry send-data * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/send-data.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * added agentless telemetry data center routing * modified agentless telemetry routing * updated telemetry logs schema * polished instrumentation telemetry PR * removed app-started error field for now --------- Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: bojbrook <[email protected]> Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Thomas Hunter II <[email protected]>
* adding required headers for in tel * adding required headers for in tel * updating version in unit tests * updating version in unit tests * app_started- extended_heartbeat- header- * updating heartbeat and adding extendedheartbeat * updating telemetry to v2 * worked on addressing telemetry uniform heartbeat * added some tests for instel v2 * cleaned up instel tests * adding dependencies variable check & tests * change to capture initial load for dependencies * Initial retry logic for telemetry * fixing heartbeat tests * adding in extended heartbeat * Cleaned up Index and send data * fixed syntax on telemetry tests * Added extended heartbeat logic * updated app-heartbeat test * modified config file for app-started * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * fix app-dependencies-loaded * modified config file to support telemetry app-started * modified config file for telemetry * modified config file to report tracer config values to telemetry * finished updating telemetry event app-started from v1 to v2 * fixed config file * fixed lint errors * attempt to remove yarn.lock changes * fixed telemetry settimeout bug * removed config file changes for now * reverted changes in config.spec.js * fixed bugs * disabled telemetry app-heartbeat test for now * added in origin field for telemetry app-started config * only send integrations through telemetry when there are integrations to be sent * only send integrations through telemetry when there are integrations to be sent * corrected telemetry event name * added back missing telemetry config value * added commit to skip telemetry heartbeat test for now * fixed telemetry send-data * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/send-data.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * added agentless telemetry data center routing * modified agentless telemetry routing * updated telemetry logs schema * polished instrumentation telemetry PR * removed app-started error field for now --------- Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: bojbrook <[email protected]> Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Thomas Hunter II <[email protected]>
* adding required headers for in tel * adding required headers for in tel * updating version in unit tests * updating version in unit tests * app_started- extended_heartbeat- header- * updating heartbeat and adding extendedheartbeat * updating telemetry to v2 * worked on addressing telemetry uniform heartbeat * added some tests for instel v2 * cleaned up instel tests * adding dependencies variable check & tests * change to capture initial load for dependencies * Initial retry logic for telemetry * fixing heartbeat tests * adding in extended heartbeat * Cleaned up Index and send data * fixed syntax on telemetry tests * Added extended heartbeat logic * updated app-heartbeat test * modified config file for app-started * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * fix app-dependencies-loaded * modified config file to support telemetry app-started * modified config file for telemetry * modified config file to report tracer config values to telemetry * finished updating telemetry event app-started from v1 to v2 * fixed config file * fixed lint errors * attempt to remove yarn.lock changes * fixed telemetry settimeout bug * removed config file changes for now * reverted changes in config.spec.js * fixed bugs * disabled telemetry app-heartbeat test for now * added in origin field for telemetry app-started config * only send integrations through telemetry when there are integrations to be sent * only send integrations through telemetry when there are integrations to be sent * corrected telemetry event name * added back missing telemetry config value * added commit to skip telemetry heartbeat test for now * fixed telemetry send-data * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/send-data.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * added agentless telemetry data center routing * modified agentless telemetry routing * updated telemetry logs schema * polished instrumentation telemetry PR * removed app-started error field for now --------- Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: bojbrook <[email protected]> Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Thomas Hunter II <[email protected]>
* adding required headers for in tel * adding required headers for in tel * updating version in unit tests * updating version in unit tests * app_started- extended_heartbeat- header- * updating heartbeat and adding extendedheartbeat * updating telemetry to v2 * worked on addressing telemetry uniform heartbeat * added some tests for instel v2 * cleaned up instel tests * adding dependencies variable check & tests * change to capture initial load for dependencies * Initial retry logic for telemetry * fixing heartbeat tests * adding in extended heartbeat * Cleaned up Index and send data * fixed syntax on telemetry tests * Added extended heartbeat logic * updated app-heartbeat test * modified config file for app-started * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * fix app-dependencies-loaded * modified config file to support telemetry app-started * modified config file for telemetry * modified config file to report tracer config values to telemetry * finished updating telemetry event app-started from v1 to v2 * fixed config file * fixed lint errors * attempt to remove yarn.lock changes * fixed telemetry settimeout bug * removed config file changes for now * reverted changes in config.spec.js * fixed bugs * disabled telemetry app-heartbeat test for now * added in origin field for telemetry app-started config * only send integrations through telemetry when there are integrations to be sent * only send integrations through telemetry when there are integrations to be sent * corrected telemetry event name * added back missing telemetry config value * added commit to skip telemetry heartbeat test for now * fixed telemetry send-data * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/send-data.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * added agentless telemetry data center routing * modified agentless telemetry routing * updated telemetry logs schema * polished instrumentation telemetry PR * removed app-started error field for now --------- Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: bojbrook <[email protected]> Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Thomas Hunter II <[email protected]>
* adding required headers for in tel * adding required headers for in tel * updating version in unit tests * updating version in unit tests * app_started- extended_heartbeat- header- * updating heartbeat and adding extendedheartbeat * updating telemetry to v2 * worked on addressing telemetry uniform heartbeat * added some tests for instel v2 * cleaned up instel tests * adding dependencies variable check & tests * change to capture initial load for dependencies * Initial retry logic for telemetry * fixing heartbeat tests * adding in extended heartbeat * Cleaned up Index and send data * fixed syntax on telemetry tests * Added extended heartbeat logic * updated app-heartbeat test * modified config file for app-started * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * fix app-dependencies-loaded * modified config file to support telemetry app-started * modified config file for telemetry * modified config file to report tracer config values to telemetry * finished updating telemetry event app-started from v1 to v2 * fixed config file * fixed lint errors * attempt to remove yarn.lock changes * fixed telemetry settimeout bug * removed config file changes for now * reverted changes in config.spec.js * fixed bugs * disabled telemetry app-heartbeat test for now * added in origin field for telemetry app-started config * only send integrations through telemetry when there are integrations to be sent * only send integrations through telemetry when there are integrations to be sent * corrected telemetry event name * added back missing telemetry config value * added commit to skip telemetry heartbeat test for now * fixed telemetry send-data * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/send-data.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * added agentless telemetry data center routing * modified agentless telemetry routing * updated telemetry logs schema * polished instrumentation telemetry PR * removed app-started error field for now --------- Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: bojbrook <[email protected]> Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Thomas Hunter II <[email protected]>
* adding required headers for in tel * adding required headers for in tel * updating version in unit tests * updating version in unit tests * app_started- extended_heartbeat- header- * updating heartbeat and adding extendedheartbeat * updating telemetry to v2 * worked on addressing telemetry uniform heartbeat * added some tests for instel v2 * cleaned up instel tests * adding dependencies variable check & tests * change to capture initial load for dependencies * Initial retry logic for telemetry * fixing heartbeat tests * adding in extended heartbeat * Cleaned up Index and send data * fixed syntax on telemetry tests * Added extended heartbeat logic * updated app-heartbeat test * modified config file for app-started * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * fix app-dependencies-loaded * modified config file to support telemetry app-started * modified config file for telemetry * modified config file to report tracer config values to telemetry * finished updating telemetry event app-started from v1 to v2 * fixed config file * fixed lint errors * attempt to remove yarn.lock changes * fixed telemetry settimeout bug * removed config file changes for now * reverted changes in config.spec.js * fixed bugs * disabled telemetry app-heartbeat test for now * added in origin field for telemetry app-started config * only send integrations through telemetry when there are integrations to be sent * only send integrations through telemetry when there are integrations to be sent * corrected telemetry event name * added back missing telemetry config value * added commit to skip telemetry heartbeat test for now * fixed telemetry send-data * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/send-data.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * added agentless telemetry data center routing * modified agentless telemetry routing * updated telemetry logs schema * polished instrumentation telemetry PR * removed app-started error field for now --------- Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: bojbrook <[email protected]> Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Thomas Hunter II <[email protected]>
* adding required headers for in tel * adding required headers for in tel * updating version in unit tests * updating version in unit tests * app_started- extended_heartbeat- header- * updating heartbeat and adding extendedheartbeat * updating telemetry to v2 * worked on addressing telemetry uniform heartbeat * added some tests for instel v2 * cleaned up instel tests * adding dependencies variable check & tests * change to capture initial load for dependencies * Initial retry logic for telemetry * fixing heartbeat tests * adding in extended heartbeat * Cleaned up Index and send data * fixed syntax on telemetry tests * Added extended heartbeat logic * updated app-heartbeat test * modified config file for app-started * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * fix app-dependencies-loaded * modified config file to support telemetry app-started * modified config file for telemetry * modified config file to report tracer config values to telemetry * finished updating telemetry event app-started from v1 to v2 * fixed config file * fixed lint errors * attempt to remove yarn.lock changes * fixed telemetry settimeout bug * removed config file changes for now * reverted changes in config.spec.js * fixed bugs * disabled telemetry app-heartbeat test for now * added in origin field for telemetry app-started config * only send integrations through telemetry when there are integrations to be sent * only send integrations through telemetry when there are integrations to be sent * corrected telemetry event name * added back missing telemetry config value * added commit to skip telemetry heartbeat test for now * fixed telemetry send-data * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/send-data.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * added agentless telemetry data center routing * modified agentless telemetry routing * updated telemetry logs schema * polished instrumentation telemetry PR * removed app-started error field for now --------- Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: bojbrook <[email protected]> Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Thomas Hunter II <[email protected]>
* adding required headers for in tel * adding required headers for in tel * updating version in unit tests * updating version in unit tests * app_started- extended_heartbeat- header- * updating heartbeat and adding extendedheartbeat * updating telemetry to v2 * worked on addressing telemetry uniform heartbeat * added some tests for instel v2 * cleaned up instel tests * adding dependencies variable check & tests * change to capture initial load for dependencies * Initial retry logic for telemetry * fixing heartbeat tests * adding in extended heartbeat * Cleaned up Index and send data * fixed syntax on telemetry tests * Added extended heartbeat logic * updated app-heartbeat test * modified config file for app-started * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * updating extended heartbeat to setInterval * adding tests for extendedheartbeat * fix app-dependencies-loaded * modified config file to support telemetry app-started * modified config file for telemetry * modified config file to report tracer config values to telemetry * finished updating telemetry event app-started from v1 to v2 * fixed config file * fixed lint errors * attempt to remove yarn.lock changes * fixed telemetry settimeout bug * removed config file changes for now * reverted changes in config.spec.js * fixed bugs * disabled telemetry app-heartbeat test for now * added in origin field for telemetry app-started config * only send integrations through telemetry when there are integrations to be sent * only send integrations through telemetry when there are integrations to be sent * corrected telemetry event name * added back missing telemetry config value * added commit to skip telemetry heartbeat test for now * fixed telemetry send-data * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/dependencies.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/send-data.js Co-authored-by: Thomas Hunter II <[email protected]> * Update packages/dd-trace/src/telemetry/index.js Co-authored-by: Thomas Hunter II <[email protected]> * added agentless telemetry data center routing * modified agentless telemetry routing * updated telemetry logs schema * polished instrumentation telemetry PR * removed app-started error field for now --------- Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: Sam Brenner <[email protected]> Co-authored-by: bojbrook <[email protected]> Co-authored-by: Crystal Magloire <[email protected]> Co-authored-by: Thomas Hunter II <[email protected]>
What does this PR do?
The original PR to upgrade telemetry broke too many things due to config file changes. Since the config file changes were made in order to support identifying config value origins in telemetry event app-started, we are putting it as "known" for now. We want to upgrade to v2 asap, and then add in origin for config values.
Additional Notes
Security
Datadog employees:
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!