Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify service version during initial newrelic configuration #898

Open
clarkmcc opened this issue Apr 8, 2024 · 6 comments
Open

Specify service version during initial newrelic configuration #898

clarkmcc opened this issue Apr 8, 2024 · 6 comments

Comments

@clarkmcc
Copy link

clarkmcc commented Apr 8, 2024

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

newrelic.NewApplication(newrelic.ConfigAppVersion(version.String))

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

@nr-swilloughby
Copy link
Contributor

Thank you for this enhancement request. We're reviewing it and will let you know how we can proceed with it.

@nr-swilloughby
Copy link
Contributor

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?

@clarkmcc
Copy link
Author

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.

@nr-swilloughby
Copy link
Contributor

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.

@clarkmcc
Copy link
Author

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?

@nr-swilloughby
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants