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

Ignore ApiDiagnostics with empty loggerId after JSON transform #530

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeroenmaes
Copy link

Scenario:
Use the JSON transform capabilities to transform a loggerId to an empty value in order to disable the API logger in a higher environment, but have it still in the repository for the lower environment.

configuration.env.yaml example:

apis:
  - name: petstore-api    
    diagnostics:
      - name: applicationinsights
        properties:
          loggerId: ''

The result is an empty string value for the loggerId field in the JSON payload

PR Changes:
When an empty values is found for the required loggerId value for the API call, the call is not executed and a warning is logged instead.

@waelkdouh
Copy link
Contributor

Hi we just released v6 release candidate. Can you please try to apply your PR on the new code base?

1 similar comment
@waelkdouh
Copy link
Contributor

Hi we just released v6 release candidate. Can you please try to apply your PR on the new code base?

@waelkdouh
Copy link
Contributor

Hi I just did a quick test using the azure apim portal to try to disable the diagnostics settings for an api and when tracking the network traffic it seems that a delete request is being sent to the server. So my question is did you test your suggested solution before you created the PR as your solution doesn't seem correct.
image

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

Successfully merging this pull request may close these issues.

3 participants