Skip to content

Commit 356c20c

Browse files
committed
Add deprecate warning
1 parent c7d50da commit 356c20c

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

receiver/azuremonitorreceiver/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The following settings are required:
2424
The following settings are optional:
2525

2626
- `credentials` to get valid credentials for azure. It should be the id of an `azureauthextension` component.
27-
- `auth`, if `credentials` are not specified (default = service_principal): Specifies the used authentication method:
27+
- `auth` (deprecated), if `credentials` are not specified (default = service_principal). Specifies the used authentication method:
2828
- Supported values for `auth` are `service_principal`, `workload_identity`, `managed_identity`, `default_credentials`.
2929
- `resource_groups` (default = none): Filter metrics for specific resource groups, not setting a value will scrape metrics for all resources in the subscription.
3030
- `services` (default = none): Filter metrics for specific services, not setting a value will scrape metrics for all services integrated with Azure Monitor.

receiver/azuremonitorreceiver/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ type Config struct {
259259
// useless.
260260
Credentials string `mapstructure:"credentials"`
261261

262+
// Authentication is deprecated.
262263
Authentication string `mapstructure:"auth"`
263264
TenantID string `mapstructure:"tenant_id"`
264265
ClientID string `mapstructure:"client_id"`

receiver/azuremonitorreceiver/scraper.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ func (s *azureScraper) loadCredentials(host component.Host) (err error) {
186186
return nil
187187
}
188188

189+
s.settings.Logger.Warn("'auth' is deprecated, use 'credentials' instead")
189190
switch s.cfg.Authentication {
190191
case defaultCredentials:
191192
if s.cred, err = s.azDefaultCredentialsFunc(nil); err != nil {

0 commit comments

Comments
 (0)