Logging does not show root cause
See original GitHub issueI am having problems finding the cause of printed errors. They provide information about what the results were, but not what caused it, or what paths were attempted.
In the case of AzureMonitor, when I had invalid role permissions, I was getting
fail: Promitor.Integrations.AzureMonitor.Logging.AzureMonitorIntegrationLogger[0]
Exception in 5: Microsoft.Azure.Management.Monitor.Fluent.Models.ErrorResponseException: Operation returned an invalid status code 'Forbidden'
This tells me that some url probably received an HTTP 403, but thatβs all I know. I think the URL, status code and the actual error message from the API would of interest here.
When I had configured the proper roles, I was getting the following error
fail: Promitor.Integrations.AzureMonitor.Logging.AzureMonitorIntegrationLogger[0]
Exception in 5: Microsoft.Azure.Management.Monitor.Fluent.Models.ErrorResponseException: Operation returned an invalid status code 'NotFound'
I donβt know what isnβt found. More verbosity in the logs would be nice. Or am I missing a flag?
Configuration
Config
server:
httpPort: 8080
prometheus:
# metricUnavailableValue: NaN
# enableMetricTimestamps: true
scrapeEndpoint:
baseUriPath: /metrics
metricsConfiguration:
absolutePath: /config/metrics-declaration.yaml
telemetry:
containerLogs:
isEnabled: false
defaultVerbosity: debug
azureMonitor:
logging:
informationLevel: BodyAndHeaders
isEnabled: true
Metrics
version: v1
azureMetadata:
tenantId: xxx
subscriptionId: xxx
resourceGroupName: promitor
metricDefaults:
aggregation:
interval: 00:05:00
scraping:
# Every minute
schedule: "0 * * ? * *"
metrics:
- name: promitor_demo_azuresqlmanagedinstance_nodes
description: "The amount of nodes for an Azure SQL Managed Instance."
resourceType: SqlManagedInstance
azureMetricConfiguration:
metricName: virtual_core_count
aggregation:
type: Average
resources:
- instanceName: my-special-postgres-instance
Specifications
- Version: 1.4.0
- Platform: Docker on Linux
- Subsystem:
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
python logging root logger does not show info even if I set ...
Okay, but you found out the problem: when logging level set to DEBUG , the root logger is not working as expected. Debug...
Read more >Logging HOWTO β Python 3.11.4 documentation
Basic Logging Tutorial: Logging is a means of tracking events that happen when ... Don't worry about the 'root' part for now: it...
Read more >Logging exceptions root cause first - Tomasz Nurkiewicz
Not very intuitive, don't you think? And what is this red ellipse showing? Yes, it is the root cause of the failure (the...
Read more >Zebrium: Root Cause as a Service | ML for Logs
Root Cause as a Service: automatically see the root cause of any problem with 95.8% accuracy. Works with your monitoring and other tools....
Read more >Automation for Jira: How to find the Root Cause ...
The root cause for why an Error might appear in the Audit Log can vary greatly, but in this case, we'll use a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks for the response. Yeah, it appeared to be an error caused by myself. Sorry about that. Feel free to close this issue now. I donβt expect you to do anything about this feedback, but Iβll just post my thoughts as Iβm working with it.
Azure Monitor logging
Iβm still not sure what the
azureMonitor.logging.informationLevel: BodyAndHeadersdoes. Is this for the requests towards the Azure Monitor API?API requests logging
For requests that are being made to the Azure Monitor API, like here, where Iβm getting null values, if I could enable verbose logging on the HTTP requests, e.g. see the URL being queried, I could go straight into the API and look around for myself.
In this particular instance, it appeared to be that intervals < 5 minutes only occationally returned data.
After setting aggregation interval to 5 minutes, both values returned data for all requests. I suspect this isnβt an isse with Promitor, but rather the upstream API restrictions/limitations (?).
Happy to help and thanks for trying/using Promitor.
Feel free to let me know if you want to be listed on https://promitor.io/#Customers