Skip to content

[exporter/azuremonitorexporter] Regression issue, property endpoint is ignored when using instrumentation_key #33971

Closed as not planned
@michaelkira

Description

@michaelkira

Component(s)

exporter/azuremonitor

What happened?

Description

When we upgrade collector version from 0.56.0 to 0.96.0, we find we no longer export trace info when using
endpoint:
https://dc.applicationinsights.azure.cn/v2/track

Checking the code, it seems when connectionString is null, the collector will take the DefaultIngestionEndpoint and ignored passed in endpoint.
This cause we not able to drop data to mooncake application insights

connectionVars.IngestionURL = getIngestionURL(DefaultIngestionEndpoint)

Steps to Reproduce

Use 0.96.0
Pass in
endpoint: https://dc.applicationinsights.azure.cn/v2/track
instrumentation_key: your key

Expected Result

The trace data ingested into mooncake app insights

Actual Result

No data ingested

Collector version

0.96.0

Environment information

Environment

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

OpenTelemetry Collector configuration

apiVersion: v1
data:
  otel-collector-config: |
    receivers:
      zipkin:
        endpoint: 0.0.0.0:9411
    extensions:
      health_check:
      pprof:
        endpoint: :1888
      zpages:
        endpoint: :55679
    exporters:
      logging:
        loglevel: debug
      azuremonitor:
        endpoint:
https://dc.applicationinsights.azure.cn/v2/track
        instrumentation_key: your key
        maxbatchsize: 100
        maxbatchinterval: 5s
    service:
      extensions: [pprof, zpages, health_check]
      pipelines:
        traces:
          receivers: [zipkin]
          exporters: [azuremonitor,logging]
kind: ConfigMap

Log output

No error log

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions