Skip to content

Database and Collection names are not displayed correctly for CosmosDB SDK 3.43 #2903

@piotr-rojek

Description

@piotr-rojek
  • Microsoft.Azure.Cosmos 3.43.1
  • Microsoft.ApplicationInsights 2.22.0
  • NET 8
  • Azure Web App

Describe the bug

After changes to Azure/azure-cosmos-dotnet-v3 OpenTelemetryAttributeKeys.cs done in Azure/azure-cosmos-dotnet-v3#4622, the code in microsoft/ApplicationInsights-dotnet AzureSdkDiagnosticsEventHandler.cs cannot find database and collection names anymore.

image

To Reproduce

  • Create .net console app from a template;
  • enable application insights;
  • enable cosmosdb + CosmosClientOptions.DisableDistributedTracing = false

We will close this issue if:

  • AzureSdkDiagnosticsEventHandler.SetCosmosDbProperties() supports both the old and the new (OTEL compatible) property names

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions