Skip to content

Azure receiver not azure china #34315

Closed
Closed
@mo-silent

Description

@mo-silent

Component(s)

receiver/azuremonitor

What happened?

Description

When I use azure monitorreceiver, I find that it does not work with azure china, and in the source code, I see that azure china is not defined
I would love to be able to use azure china.
As follows code:

func (s *azureScraper) getArmClientOptions() *arm.ClientOptions {
	var cloudToUse cloud.Configuration
	switch s.cfg.Cloud {
	case azureGovernmentCloud:
		cloudToUse = cloud.AzureGovernment
        // Add the following code
        case azureChinaCloud:
		cloudToUse = cloud.AzureChina
        // --------------
	default:
		cloudToUse = cloud.AzurePublic
	}
	options := arm.ClientOptions{
		ClientOptions: azcore.ClientOptions{
			Cloud: cloudToUse,
		},
	}

	return &options
}

Collector version

laster

Environment information

Environment

OS: dokcer

OpenTelemetry Collector configuration

No response

Log output

error: reply status code was 400:\n{\"error\":\"invalid_resource\",\"error_description\":\"AADSTS500011: The resource principal named https://management.core.windows.net/ was not found in the tenant named Procter & Gamble Guangzhou. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant.

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions