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

Filter redis dependency logs #1405

Open
skhilliard opened this issue Jan 15, 2025 · 6 comments
Open

Filter redis dependency logs #1405

skhilliard opened this issue Jan 15, 2025 · 6 comments
Assignees
Labels

Comments

@skhilliard
Copy link

skhilliard commented Jan 15, 2025

We have a Node.js application and are currently using version 3.3.0 of the library.

We recently noticed a very large increase in our Application Insights log costs in the Azure portal and have determined that it is largely due to a big increase in the number of Redis dependency log entries being created (comparing the month of November vs December and beyond). These are valid logs of PUBLISH events, but for some reason these additional items only started appearing after November...not sure why they weren't appearing before as these aren't new events and we've not changed versions of this package in the timeframe mentioned above. The only theory at the moment is due to us upgrading to Node 22 (from Node 20).

I have two questions regarding this:

  1. Any idea why these additional Redis events would start to appear? Is this related to upgrading to a newer Node version?
  2. Is there a way to filter out some of these events (not just turning off Redis logging entirely)?

Thanks,
Kelly

@JacksonWeber
Copy link
Contributor

Hey @skhilliard,

  1. I haven't seen any reported cases of customers seeing more Redis events after upgrading Node versions. However, I would expect that this might be linked to the major version bump from 2.x SDK to 3.x SDK. Do you happen to know when you upgraded?
  2. Absolutely, you can always filter OpenTelemetry-based telemetry (including that which is generated by the Redis instrumentation) by using a SpanProcessor.

@JacksonWeber JacksonWeber self-assigned this Jan 15, 2025
@skhilliard
Copy link
Author

@JacksonWeber That's what is so odd. We upgraded to the 3.x version of app insights (3.2.1) back in September. We didn't see the increase in the volume of redis dependency entries (specifically for the PUBLISH operation) until December.

Regarding using a SpanProcessor...we used the "upgrade" path vs the "clean install" path described here: https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-nodejs-migrate?tabs=cleaninstall

Since we did that, it isn't possible to use a SpanProcessor, is it?

@JacksonWeber
Copy link
Contributor

@skhilliard That is strange. Did you update to a higher version of the v3 SDK recently? Likely that it came with a more recent version of the redis instrumentation that may collect more telemetry.

As for using SpanProcessors with the upgrade path, you absolutely can since it's all just OpenTelemetry under the hood.

@skhilliard
Copy link
Author

skhilliard commented Jan 17, 2025

@JacksonWeber Yes....it is very odd. We did upgrade to 3.3.0, but that would have been active in November. That's why I was wondering if perhaps us upgrading to Node 22 (we were on 20) was perhaps linked to this.

We can see if we can "hook in" a SpanProcessor even though our use of OpenTelemetry is via the 3.x application insights package.

@JacksonWeber
Copy link
Contributor

@skhilliard Please let me know if you have any trouble implementing the spanProcessor. Thanks!

@skhilliard
Copy link
Author

@JacksonWeber Will do!

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

No branches or pull requests

2 participants