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

Possibility to disable spring-schedule tracing #1488

Closed
vaaalery opened this issue Feb 11, 2021 · 2 comments · Fixed by #1495
Closed

Possibility to disable spring-schedule tracing #1488

vaaalery opened this issue Feb 11, 2021 · 2 comments · Fixed by #1495
Milestone

Comments

@vaaalery
Copy link

Hi

Is your feature request related to a problem? Please describe.
I have an azure function written in Java which is using spring-cloud-function-adapter-azure, part of my code containing method with @Scheduled annotation with fixedDelay set to 10 seconds. I enabled application insights agent by setting environment variable XDT_MicrosoftApplicationInsights_Java=1 in function app configuration. Logic under annotated method doesn't give me any valuable information so I would like to exclude all spring-scheduling request from tracing in application insights. Currently after each 10 seconds I'm getting information about execution, it's making mess in logs and price of usage is rising.

image

Describe the solution you would like
Disable spring-scheduling requests in codeless way (e.g by using environment variable, configuration file etc)

Describe alternatives you have considered
I went through open telemetry documentation and application agent source code and thought I can solve my issue by setting JAVA_OPTS in application insights to -Dotel.instrumentation.spring-scheduling.enabled=false or -Dotel.integration.spring-scheduling.enabled=false but it didn't help.

@trask
Copy link
Member

trask commented Feb 12, 2021

hi @kamilwrobel! yes, this is a great point, we will add configuration for this shortly, and add env var support for all of our instrumentation suppressing configuration

@trask
Copy link
Member

trask commented Mar 11, 2021

3.0.3-BETA is released, supporting this both in json:

{
  "instrumentation": {
    "springScheduling": {
      "enabled": false
    }
  }
}

or by env var:

APPLICATIONINSIGHTS_INSTRUMENTATION_SPRING_SCHEDULING_ENABLED=false

@ghost ghost locked as resolved and limited conversation to collaborators Jul 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants