Skip to content

Conversation

@joegoldman2
Copy link
Contributor

@joegoldman2 joegoldman2 commented Nov 2, 2025

  • db.system.name value cosmosdb => azure.cosmosdb
  • azure.cosmosdb.client.id => azure.client.id
  • azure.cosmosdb.request.request_charge => azure.cosmosdb.operation.request_charge
  • azure.cosmosdb.contacted_regions => azure.cosmosdb.operation.contacted_regions
  • azure.cosmosdb.row.count => db.response.returned_rows

Tested manually with both the Application Insights SDK and OpenTelemetry SDK.

/// Represents the unique identifier of the client instance.
/// </summary>
public const string ClientId = "azure.cosmosdb.client.id";
public const string ClientId = "azure.client.id";
Copy link
Member

@FabianMeiswinkel FabianMeiswinkel Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can just replace the attribute names - this would be a breakign change. Instead populating attributes with both names seems the appropriate way. Maybe we can add an opt-in to allow only populating teh new names if a customer explicitly opt-in into it for perf reasons.

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current change is a breaking behavior change

@joegoldman2
Copy link
Contributor Author

@FabianMeiswinkel thank you for the review.

Is the support for OpenTelemetry already stable in this lib? As far as I know, it's not yet stable and something like AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", true); is still necessary today.

Also, such changes have already been made in the past (#4995 or #4765 for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants