Skip to content

Scraping fails if API name contains special character (for ex. &) #27

@sandormedzi

Description

@sandormedzi

Prometheus Exporter version
1.0.2

API-Gateway Version
7.7.20220830

Actual behavior

In sandbox where there are just a few APIs, the exporter runs as intended, but on other plattform, where we have much more APIs, if the API name contains an "&" character, the following error occurs (and then the container shuts down):

1684832542297 ERROR [timer: timer-1] [request-id: **] Get service metrics (axway-api-management.4) Error getting API-Gateway metrics: 'timeline?timeline=10m&metricGroupType=Service&name=removed & removed&metricType=successes&metricType=failures&metricType=exceptions&metricType=numMessages&metricType=processingTimeAvg' from Admin-Node-Manager. Request sent to: ******. Response-Code: 403
1684832542301 ERROR [timer: timer-1] [request-id: **] Shutdown (power.1) [object Object] (Error-Code: 99)

Even if we rename the API from "something & something" to "something and something" the exporter still fails, as

Expected behavior
API name should not cause errors (I understand that the & sign is very special here, but even if we rename,

Test case sample
scrape any GW where there are APIs with "&" in name

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions