You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example using environment variable:
Ensure APPLICATIONINSIGHTS_CONNECTION_STRING is set in your environment, then configure the exporter without specifying a connection string or instrumentation key:
exporters:
azuremonitor:
this should be possible according to the docs, but my otel-collector crashes when doing this.
Steps to Reproduce
Create an otel-collector with the following exporter config
exporters:
azuremonitor:
container crashes
Expected Result
Able to use APPLICATION_INSIGHTS_CONNECTION_STRING as an environment variable on the pod sending data to the otel collector to simplify configuration overhead.
Actual Result
OTEL collector crashes if connection string is not set
Error: failed to build pipelines: failed to create "azuremonitor" exporter for data type"logs": ConnectionString and InstrumentationKey cannot be empty 2024/11/12 12:41:54 collector server run finished with error: failed to build pipelines: failed to create "azuremonitor" exporter for data type"logs": ConnectionString and InstrumentationKey cannot be empty
Hi @audunsolemdal , I can't reproduce and can use APPLICATIONINSIGHTS_CONNECTION_STRING env as connection string to send data successfully. Also, here's a screenshot which indicating it can retrieve from env successfully. Can you confirm APPLICATIONINSIGHTS_CONNECTION_STRING has been set as env for collector?
Can you confirm APPLICATIONINSIGHTS_CONNECTION_STRING has been set as env for collector?
I was hoping it was possible to set it at the pod which is sending data to the collector, not the collector itself. I guess that was wishful thinking when reading the docs. Is there a way to send data from the OTEL collector to one or more target application insights without specifying the connection strings at the OTEL collector level?
Component(s)
exporter/azuremonitor
What happened?
Description
According to the docs
this should be possible according to the docs, but my otel-collector crashes when doing this.
Steps to Reproduce
Create an otel-collector with the following exporter config
container crashes
Expected Result
Able to use APPLICATION_INSIGHTS_CONNECTION_STRING as an environment variable on the pod sending data to the otel collector to simplify configuration overhead.
Actual Result
OTEL collector crashes if connection string is not set
Collector version
otel/opentelemetry-collector-k8s:0.111.0
Environment information
Environment
otel-collector helm chart
OpenTelemetry Collector configuration
Log output
Additional context
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/azuremonitorexporter/README.md#configuration-options
Relates to #34188
The text was updated successfully, but these errors were encountered: