Skip to content
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

[receiver/azuremonitor] Handle errors; don't ignore them #31268

Closed
nslaughter opened this issue Feb 14, 2024 · 4 comments · Fixed by #33584
Closed

[receiver/azuremonitor] Handle errors; don't ignore them #31268

nslaughter opened this issue Feb 14, 2024 · 4 comments · Fixed by #33584
Labels
bug Something isn't working receiver/azuremonitor

Comments

@nslaughter
Copy link
Contributor

Component(s)

receiver/azuremonitor

What happened?

Description

Code currently fails silently when getting clients from Azure SDK for metrics and metric definitions.

Steps to Reproduce

Read the code called by start method of scraper. It currently holes errors when instantiating SDK clients the scraper uses.

Look at getArmClient and azureScraper.GetMetricsValuesClient.

Expected Result

Handle errors.

Actual Result

Ignores errors.

Collector version

v0.94.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

# N/A

Log output

N/A

Additional context

N/A

@nslaughter nslaughter added bug Something isn't working needs triage New item requiring triage labels Feb 14, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member

Agreed, the errors shouldn't be hidden and ignored. I checked and found this has been the functionality since this component was introduced, but there's no comment as to why they're ignored.

I see this is in the call stack of every scrape call, so either an error here is pretty impactful, or it would spam logs. I'm not familiar enough with this receiver to know which is true.

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Feb 28, 2024
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Copy link
Contributor

github-actions bot commented Jul 1, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Jul 1, 2024
@crobert-1 crobert-1 removed the Stale label Jul 1, 2024
codeboten pushed a commit that referenced this issue Jul 10, 2024
…zureCredential authentication (#33584)

Description:
Enhances azuremonitor receiver authentication by using [managed
identity](https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication?tabs=bash#option-3-use-a-managed-identity)
or [environment
variables](https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication?tabs=bash#option-1-define-environment-variables).
I have extended the config parameter auth to support `managed_identity`
and `default_credentials`. Also fix the issue where the errors were
being ignored.

Link to tracking Issue: 
1) Fixes
#31268
2) No tracing issues for extenting auth methods

Testing: Tested on my Azure VMs with managed identity

Documentation: Added to README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working receiver/azuremonitor
Projects
None yet
2 participants