Skip to content

Commit

Permalink
Fix null ikey for _otelresource_ custom metrics (#37352)
Browse files Browse the repository at this point in the history
* Fix null ikey

* Prepare to release beta.13
  • Loading branch information
heyams authored Oct 24, 2023
1 parent 7f8140f commit 0bfddf1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Release History

## 1.0.0-beta.13 (Unreleased)

### Features Added

### Breaking Changes
## 1.0.0-beta.13 (2023-10-24)

### Bugs Fixed
- [Fix null ikey for _otelresource_ custom metrics](https://github.com/Azure/azure-sdk-for-java/pull/37352)

### Other Changes

## 1.0.0-beta.12 (2023-10-17)
## 1.0.0-beta.12 (2023-10-23)

### Features Added
- [Enable Statsbeat](https://github.com/Azure/azure-sdk-for-java/pull/37032)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ CompletableResultCode internalSendByBatch(TelemetryItemBatchKey telemetryItemBat
}

private TelemetryItem createOtelResourceMetric(TelemetryItemBatchKey telemetryItemBatchKey) {

MetricTelemetryBuilder builder = MetricTelemetryBuilder.create(_OTELRESOURCE_, 0);
builder.setConnectionString(telemetryItemBatchKey.connectionString);
telemetryItemBatchKey.resource.getAttributes().forEach((k, v) -> builder.addProperty(k.getKey(), v.toString()));
String roleName = telemetryItemBatchKey.resourceFromTags.get(ContextTagKeys.AI_CLOUD_ROLE.toString());
if (roleName != null) {
Expand Down

0 comments on commit 0bfddf1

Please sign in to comment.