Add script to test live API integration #128
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a
npm run check-integration
script that sends some metrics to Datadog using this library, then queries the API for those same metric values to make sure they were successfully ingested and will be visible in Datadog's UI.The goal here is to provide a minimal check of real, live integration in case a change to the actual reporter or Datadog client breaks or mis-formats something in a way that our unit tests don’t effectively catch. In most cases, our unit tests should be enough (this is why we use nock instead of just mocking the Datadog client), so this check is pretty lightweight (it only checks one metric type, for example).
I haven’t included any CI changes since @dbader would need to configure CI with working credentials. If we get that going, great, otherwise this will just have to be something maintainers run locally as needed (mainly before publishing releases).
Fixes #89.