Skip to content

[BUG] Extracting the new largeLanguageModel diagnostic setting not extracting #785

@anotherRedbeard

Description

@anotherRedbeard

Release version

v6.0.1.9

Describe the bug

When I update the AzureMonitor setting to enable the new Log LLM Messages in either the API or All APIs, it's not extracting this new value.

Image

Expected behavior

The extractor should extract all of the json from the Diagnostic management api and update the diagnostic.json file. Here is the output from the ARM API:

{
      "id": "<id>",
      "type": "Microsoft.ApiManagement/service/apis/diagnostics",
      "name": "azuremonitor",
      "properties": {
        "alwaysLog": "allErrors",
        "verbosity": "information",
        "logClientIp": true,
        "loggerId": "<logger-id>",
        "sampling": {
          "samplingType": "fixed",
          "percentage": 100
        },
        "frontend": {
          "request": {
            "headers": [
              "UseCaseId"
            ],
            "body": {
              "bytes": 8192,
              "sampling": null
            }
          },
          "response": {
            "headers": [
              "UseCaseId"
            ],
            "body": {
              "bytes": 8192,
              "sampling": null
            }
          }
        },
        "backend": {
          "request": {
            "headers": [
              "UseCaseId"
            ],
            "body": {
              "bytes": 8192,
              "sampling": null
            }
          },
          "response": {
            "headers": [
              "UseCaseId"
            ],
            "body": {
              "bytes": 8192,
              "sampling": null
            }
          }
        },
        "largeLanguageModel": {
          "logs": "enabled",
          "requests": {
            "messages": "all",
            "maxSizeInBytes": 32768
          },
          "responses": {
            "messages": "all",
            "maxSizeInBytes": 32768
          }
        },
        "tags": null
      }
    }

Actual behavior

This is what is actually saved in the diagnostic.json file:

{
  "properties": {
    "loggerId": "/subscriptions/***/resourceGroups/apiopsdemo-rg-dev/providers/Microsoft.ApiManagement/service/apim-dev/loggers/azuremonitor",
    "alwaysLog": "allErrors",
    "backend": {
      "request": {
        "body": {
          "bytes": 0
        },
        "headers": []
      },
      "response": {
        "body": {
          "bytes": 0
        },
        "headers": []
      }
    },
    "frontend": {
      "request": {
        "body": {
          "bytes": 0
        },
        "headers": []
      },
      "response": {
        "body": {
          "bytes": 0
        },
        "headers": []
      }
    },
    "logClientIp": true,
    "sampling": {
      "percentage": 100,
      "samplingType": "fixed"
    },
    "verbosity": "information"
  }
}

Reproduction Steps

Update the LLM log message section under Settings like this:
Image

Run the extractor and see it doesn't save the largeLanguageModel properties.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions