Open clarkmcc opened 2 months ago
Thank you for this enhancement request. We're reviewing it and will let you know how we can proceed with it.
For clarification, do you want this to replace the github workflow so that it would register the version as a deployment marker, or do you just want each running instance to report its own version in a way you can query or group data later?
Full disclosure, I am sticking with Datadog for now. But what I would like is the latter -- where the metrics, logs, errors etc are all associated with a specific version of an application. In this way of if I have two versions running at the same time which is common among the various deployment models that are out there, then I can more easily correlate errors with specific versions.
Based on that being what you're actually looking to accomplish, although app version isn't explicitly one of the configuration settings, your best bet with how things are implemented now is to use one of the existing means to put a custom value to represent the application version. For example, you can specify up to three app names separated by semicolons such as myapp;myapp-prod;myapp-prod-1.0
to use app name rollups. Or you could add custom metadata by setting NEW_RELIC_METADATA_APPVERSION=prod-1.0
to your environment.
Yeah but that isn't first-class support for these different types of deployment models. Sure that would show me the app version in the UI, but the reason that I want the version captured is so that all metrics, all events, etc can be faceted by the version, allowing me to easily see anomalous behavior introduced by a specific version. Can this be done with custom metadata?
The details on this and which approach best suits your needs are better handled by a technical support engineer instead of the agent development team, but in a nutshell I believe there are a number of ways you can include custom attributes with the application traces that can be queried to find telemetry based on those attributes. These can include global metadata such as via NEW_RELIC_METADATA_*
environment variables, custom attributes and metrics selectively applied to transactions and segments as needed, and custom labels.
Summary
Currently, I'm using Github Actions to indicate to new relic when I release a new version of my app, but this does not work well when there are multiple versions of my application deployed, especially during rolling deployments, or canary deployments.
Desired Behaviour
My service's version information is already baked into my binaries, it would be great if I could so something like
This is basically how datadog does it, and is much better when tracking down version-specific issues across multiple running versions of the app.
Possible Solution
Additional context