-
Notifications
You must be signed in to change notification settings - Fork 992
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
New Relic Java Agent MeterRegistry #1540
Comments
@neiljpowell Sounds like you have experience working with New Relic. Are you planning on contributing your code to the project? If you could do it in such a way to enhance the current We could discuss making yours the default behavior, as long as there is a way for users to disable that behavior if they were counting on the old way it was working. |
@checketts Hi. I do plan to contribute. Enhancing the existing NewRelicMeterRegistry should be fairly easy. I had an opportunity to discuss with @shakuzen and he suggested starting with this Issue submission to help gauge interest. |
@checketts @shakuzen The existing NewRelicMeterRegistry has been update since the last version. It's meter processing methods convert to Stream assembling the Json. The previous processed as a map then converted them all to Json before the REST call, which aligned better with the Agent's Insights API, "recordCustomEvent(string eventType, Map attributes). Adding the feature would result in undoing much of it. I'm thinking that keeping them separate may be better. Thoughts? |
I think I'd still rather have it in one |
Introduces the concept of a ClientProvider for the NewRelicMeterRegistry. This allows for different implementations of publishing metrics to New Relic, including the previous HTTP implementation as well as a new one based on the New Relic Java agent for users of that. Resolves #1540
@shakuzen We are users of the New Relic Java Agent and would like a MeterRegistry that delegates to the New Relic Insights API available on Agent.
We have created our own delegating implementation that is very similar to the existing NewRelicMeterRegistry, but it provides several additional benefits:
Additionally, we have a MeterRegistryCustomizer/MeterFilter that denies metrics that are already collected by the Agent to avoid duplication, which includes; jvm (buffer, classes, memory, threads), process (cpu, files, start, uptime); system (cpu, load) and http.server.requests.
Finally, we have an MetricsExportAutoConfiguration implementation that load our MeterRegistry based on the presence of the Agent. It also sets the Agent's instanceName and common tags for applicationName and instanceIndex for easier metric correlation via Insights NRQL
The text was updated successfully, but these errors were encountered: