Azure / apiops

APIOps applies the concepts of GitOps and DevOps to API deployment. By using practices from these two methodologies, APIOps can enable everyone involved in the lifecycle of API design, development, and deployment with self-service and automated tools to ensure the quality of the specifications and APIs that they’re building.
https://azure.github.io/apiops
MIT License
275 stars 162 forks source link

[Question] Publisher - configuration Logger in the higher environment not hourning a different app insight name #547

Open EdenGoforIt opened 1 month ago

EdenGoforIt commented 1 month ago

Release version

v5.1.4

Describe the bug

Each environment has its own subscriptions, with distinct names for Application Insights, resource groups, and subscription IDs. Despite setting the target Application Insights in the logger, it consistently defaults to the 'dev' environment's Application Insights even If I set destination environment application insights name

391 - According to this bug, the app insight names should be the same names across different environments and point to different instances of the app insights? or should I change the logger folder name for each release if I can't change the app insight instance names.

Expected behavior

test app insight instance name is used for the logger

Actual behavior

dev app insight instance name is used

Reproduction Steps

  1. create a different subscription, resource group and app insight for a new apim in test
  2. create test environment configuration file called configuration.test.yaml
  3. in the configuration.test.yaml change the following

loggers:

- name: ["dev-app-insight"] # source app insight
    properties:
      loggerType: applicationInsights
      description: test application insights
      resourceId: "/subscriptions/{{ target-subscription-id }}/resourceGroups/{{ target-resource-group }}/providers/microsoft.insights/components/{{ target-app-insight-name }}" 
      isBuffered: true
  1. Run the publisher
  2. Then you can see
    '{"error":{"code":"ValidationError","message":"One or more fields contain incorrect values:","details":[{"code":"ValidationError","target":"One or more Properties ['{0}'] specified are missing.","message":"Logger-Credentials--"}]}}

    image

github-actions[bot] commented 1 month ago
  Thank you for opening this issue! Please be patient while we will look into it and get back to you as this is an open source project. In the meantime make sure you take a look at the [closed issues](https://github.com/Azure/apiops/issues?q=is%3Aissue+is%3Aclosed) in case your question has already been answered. Don't forget to provide any additional information if needed (e.g. scrubbed logs, detailed feature requests,etc.).
  Whenever it's feasible, please don't hesitate to send a Pull Request (PR) our way. We'd greatly appreciate it, and we'll gladly assess and incorporate your changes.
waelkdouh commented 1 month ago

Please search the closed issues. This has been addressed several times in the past. Also please make sure you read the wiki.

Please remember to close this issue as a duplicate.