Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .chloggen/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ components:
- exporter/awss3
- exporter/awsxray
- exporter/azure_blob
- exporter/azure_monitor
- exporter/azuredataexplorer
- exporter/azuremonitor
- exporter/bmc_helix
- exporter/cassandra
- exporter/clickhouse
Expand Down
27 changes: 27 additions & 0 deletions .chloggen/dylan_rename-azure-monitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: deprecation

# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
component: exporter/azure_monitor

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Rename `azuremonitor` to `azure_monitor`

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [45339]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
8 changes: 4 additions & 4 deletions exporter/azuremonitorexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Example — Azure Container Apps, where `service.instance.id` is set to a random

```yaml
exporters:
azuremonitor:
azure_monitor:
connection_string: "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://ingestion.azuremonitor.com/"
tag_mappings:
cloud_role_instance: [host.name, service.instance.id, unknown-instance]
Expand All @@ -81,7 +81,7 @@ Example:
# It is highly recommended to use the connection string which includes the InstrumentationKey and IngestionEndpoint
# This is the preferred method over using 'instrumentation_key' alone.
exporters:
azuremonitor:
azure_monitor:
connection_string: "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://ingestion.azuremonitor.com/"
```

Expand All @@ -92,7 +92,7 @@ exporters:
# The use of 'instrumentation_key' alone is not recommended and will be deprecated in the future. It is advised to use the connection_string instead.
# This example is provided primarily for existing configurations that have not yet transitioned to the connection string.
exporters:
azuremonitor:
azure_monitor:
instrumentation_key: b1cd0778-85fc-4677-a3fa-79d3c23e0efd
```

Expand All @@ -102,7 +102,7 @@ Ensure `APPLICATIONINSIGHTS_CONNECTION_STRING` is set in your environment, then

```yaml
exporters:
azuremonitor:
azure_monitor:
```

## Attribute mapping
Expand Down
11 changes: 7 additions & 4 deletions exporter/azuremonitorexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"go.opentelemetry.io/collector/config/configoptional"
"go.opentelemetry.io/collector/exporter"
"go.opentelemetry.io/collector/exporter/exporterhelper"
"go.opentelemetry.io/collector/exporter/xexporter"
conventions "go.opentelemetry.io/otel/semconv/v1.40.0"
"go.uber.org/zap"

Expand All @@ -34,12 +35,14 @@ func NewFactory() exporter.Factory {
f := &factory{
loggerInitOnce: sync.Once{},
}
return exporter.NewFactory(
return xexporter.NewFactory(
metadata.Type,
createDefaultConfig,
exporter.WithTraces(f.createTracesExporter, metadata.TracesStability),
exporter.WithLogs(f.createLogsExporter, metadata.LogsStability),
exporter.WithMetrics(f.createMetricsExporter, metadata.MetricsStability))
xexporter.WithTraces(f.createTracesExporter, metadata.TracesStability),
xexporter.WithLogs(f.createLogsExporter, metadata.LogsStability),
xexporter.WithMetrics(f.createMetricsExporter, metadata.MetricsStability),
xexporter.WithDeprecatedTypeAlias(metadata.DeprecatedType),
)
}

// Implements the interface from go.opentelemetry.io/collector/exporter/factory.go
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exporter/azuremonitorexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ require (
go.opentelemetry.io/collector/exporter v1.61.1-0.20260625204839-9782f9e8a3d6
go.opentelemetry.io/collector/exporter/exporterhelper v0.155.1-0.20260625204839-9782f9e8a3d6
go.opentelemetry.io/collector/exporter/exportertest v0.155.1-0.20260625204839-9782f9e8a3d6
go.opentelemetry.io/collector/exporter/xexporter v0.155.1-0.20260625204839-9782f9e8a3d6
go.opentelemetry.io/collector/pdata v1.61.1-0.20260625204839-9782f9e8a3d6
go.opentelemetry.io/otel v1.44.0
go.uber.org/zap v1.28.0
Expand Down Expand Up @@ -66,7 +67,6 @@ require (
go.opentelemetry.io/collector/consumer v1.61.1-0.20260625204839-9782f9e8a3d6 // indirect
go.opentelemetry.io/collector/consumer/consumertest v0.155.1-0.20260625204839-9782f9e8a3d6 // indirect
go.opentelemetry.io/collector/consumer/xconsumer v0.155.1-0.20260625204839-9782f9e8a3d6 // indirect
go.opentelemetry.io/collector/exporter/xexporter v0.155.1-0.20260625204839-9782f9e8a3d6 // indirect
go.opentelemetry.io/collector/extension v1.61.1-0.20260625204839-9782f9e8a3d6 // indirect
go.opentelemetry.io/collector/extension/extensionauth v1.61.1-0.20260625204839-9782f9e8a3d6 // indirect
go.opentelemetry.io/collector/extension/extensionmiddleware v0.155.1-0.20260625204839-9782f9e8a3d6 // indirect
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions exporter/azuremonitorexporter/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
type: azuremonitor
type: azure_monitor
deprecated_type: azuremonitor
display_name: Azure Monitor Exporter

status:
Expand All @@ -15,4 +16,4 @@ tests:
instrumentation_key: b1cd0778-85fc-4677-a3fa-79d3c23e0efd
expect_consumer_error: true
goleak:
skip: true
skip: true
8 changes: 4 additions & 4 deletions exporter/azuremonitorexporter/testdata/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
azuremonitor:
azuremonitor/2:
azure_monitor:
azure_monitor/2:
# endpoint is the uri used to communicate with Azure Monitor
endpoint: "https://dc.services.visualstudio.com/v2/track"
# instrumentation_key is the unique identifier for your Application Insights resource
Expand All @@ -20,10 +20,10 @@ azuremonitor/2:
num_consumers: 10
storage: disk

azuremonitor/tag_mappings:
azure_monitor/tag_mappings:
connection_string: InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://ingestion.azuremonitor.com/
tag_mappings:
cloud_role_instance: [host.name, service.instance.id, unknown-instance]
application_version: [service.version]

disk/3:
disk/3:
2 changes: 1 addition & 1 deletion reports/distributions/contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ components:
- awss3
- awsxray
- azure_blob
- azure_monitor
- azuredataexplorer
- azuremonitor
- bmc_helix
- cassandra
- clickhouse
Expand Down
Loading