-
Notifications
You must be signed in to change notification settings - Fork 201
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
[BUG] Publisher: API Diagnostic are not getting overridden based on configuration.<environment>.yaml #627
Comments
|
Seems ApiDiagnostic.cs was dropped in version >6.0.0? Any particular reason? |
This seems related: #616 |
Closing in favor of #616. We're adding support back in, accidentally removed it v6. |
Thanks for confirmation! |
Can confirm diagnostics are getting published with v6.0.1.1 |
The version v6.0.1.1 supports extraction for api level diagnostics but not replacing loggerId from the configuration..yaml file. Here is the APIOPS logs for API level diagnostic. |
Are you able to replace loggerId for the uat and prod (target APIM) from publisher configuration..yaml ?? In my case, it is creating the loggerId with the same name as dev. Starting request |
I'm having the exact same experience in my environment. |
We only support overriding top-level resources in the publisher. You can override service-level diagnostics (which are top-level), but you can't override API diagnostics. In other words, this works: - diagnostics:
properties:
loggerId: abcd But there is no support for something like this: - apis
apiA:
diagnostics:
properties:
loggerId: abcd We will look into adding support for the above configuration, as we'll need a solution to support overrides in workspaces. In the meantime, you have to update Also, I don't think the full resource ID of the logger is required in |
Further @guythetechie s' answer, Example override yaml, apimServiceName: <apimServiceName>
namedValues:
- name: application-insights-instrumentation-key
properties:
displayName: application-insights-instrumentation-key
value: "<application-insights-instrumentation-key>"
loggers:
- name: appinsights
properties:
loggerType: applicationInsights
description: <description>
resourceId: "/subscriptions/<subscription>/resourceGroups/<resourceGroup>/providers/microsoft.insights/components/<applicationInsightsInstance>"
credentials:
instrumentationKey: "{{application-insights-instrumentation-key}}"
isBuffered: true
diagnostics:
- name: applicationinsights
properties:
verbosity: Error
loggerId: "/subscriptions/<subscription>/resourceGroups/<resourceGroup>/providers/Microsoft.ApiManagement/service/<apimServiceName>/loggers/appinsights"
apis:
- name: <apiName>
properties:
serviceUrl: "<serviceUrl>"
diagnostics:
- name: applicationinsights
properties:
verbosity: information
loggerId: "/subscriptions/<subscription>/resourceGroups/<resourceGroup>/providers/Microsoft.ApiManagement/service/<apimServiceName>/loggers/appinsights" |
Has this issue been fixed now as i am getting exactly the same error while using v6.0.1.1. Kindly provide the fix if it's working for anyone and configuration.env.yaml file if there is any change in it to make it work. |
@guythetechie, I'm looking forward to an alternative solution in v6. |
We are also seeing this issue, it doesn't override in v6.0.1.1 This snippet doesn't work anymore
|
Just to clarify,
|
/subscriptions/f5760094-......7ae94787f/resourceGroups/rg-apim-tst-cc-01/providers/Microsoft.ApiManagement/service/apim-org-tst-cc-01/loggers/appi-apim-tst-cc-01 this what we use, and it's not working |
we using this approach for a year, since version 4, we just migrated today from 4 to 6.0.1.1, but it start screaming with an error stating that it can't override, and failed the publisher |
Please publish the logs here. Make sure you scrape the logs before you publish though. |
I see that there is new version released v 6.0.1.2in release log there is an info that that bug was fixed, however I still see same error diagnostics information for API's are not overwritten from config yaml file. Example:
I'm using release version for linux in devops pipeline. |
I am getting same issue for loggerID , not able to replace using configuration.dev.yaml |
Release version
APIOps Toolkit for Azure APIM v6.0.1
Describe the bug
In the publisher, we can override environment specific values using
configuration.<environment>.yaml
file.Supported Scenarios specifies,
API Diagnostic (Provides operations for managing Diagnostic settings for the logger in an API)
is supported.And in the sample
configuration.prod.yaml
, we have this:However it doesn't seem to be working.
In Azure Portal when we enable Diagnostic Logs for an API, it does the following.
I inspected the HTTP calls the publisher is making, and I am not seeing any HTTP call to
.../apis/<apiName>/diagnostics/*
.Api Diagnostic - Create Or Update
Expected behavior
The publisher should honor and override API diagnostics as specified in the following format.
Actual behavior
The publisher doesn't override API diagnostics.
Reproduction Steps
configuration.<environment>.yaml
for the target APIM. Updateapis.diagnostics
with environment specific valuesconfiguration.<environment>.yaml
The text was updated successfully, but these errors were encountered: