Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Error from Ingestion: 100: Field 'ai.internal.sdkVersion' on type 'ContextTagKeys' is too long. #37775

Closed
makinsc opened this issue Jul 21, 2023 · 5 comments · Fixed by #37807
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@makinsc
Copy link

makinsc commented Jul 21, 2023

Library name and version

Azure.Monitor.OpenTelemetry.Exporter

Describe the bug

Hello, I am receiving this error message in telemetry:
OpenTelemetry-AzureMonitor-Exporter - EventId: [8], EventName: [TransmissionFailed], Message: [Transmission failed. StatusCode: 400. Error from Ingestion: 100: Field 'ai.internal.sdkVersion' on type 'ContextTagKeys' is too long. Expected: 64 characters. Action: Telemetry is dropped. Origin: AzureMonitorLogExporter. Instrumentation Key: 022071e5-8639-4cb1-94fd-7097c92eea95. Configured Endpoint: https://westeurope-5.in.applicationinsights.azure.com/. Current Endpoint: westeurope-5.in.applicationinsights.azure.com]

The traces that are trying to send to Azure Monitor is this:
{"name":"Metric","time":"2023-07-21T11:51:45.2308956Z","iKey":"022071e5-8639-4cb1-94fd-7097c92eea95","tags":{"ai.cloud.role":"unknown_service:dotnet","ai.cloud.roleInstance ":"ES-PF38955J","ai.internal.sdkVersion":"dotnet4.6.30411.01 @BuiltBy: AzDevOps-vs2017b17000759 @Branch: release/2.1-MSRC @srccode: https://github.com/dotnet/coreclr/tree/f6b4d10f1b98 94c9336c514c7ee6cff5c82535fe:otel1.5.1:ext1.0.0-beta.13"},"data":{"baseType":"MetricData","baseData":{"metrics":[{"name":"process.runtime.dotnet.gc.collections.count","value":0}],"pro perties":{"generation":"gen2"},"ver":2}}}

as can be seen, the value of ai.internal.sdkVersion is too long.

I am integrating it into a netcore 2.1 project and the list of added packages are the following:
OpenTelemetry" Version="1.5.1"
OpenTelemetry.Extensions.Hosting" Version="1.5.1"
OpenTelemetry.Instrumentation.AspNetCore" Version="1.5.0-beta.1"
OpenTelemetry.Instrumentation.Http" Version="1.5.0-beta.1"
OpenTelemetry.Instrumentation.Runtime" Version="1.5.0"
Azure.Monitor.OpenTelemetry.AspNetCore" Version="1.0.0-beta.5"
The configuration is the following:

var resourceBuilder = ResourceBuilder.CreateDefault()
             // add attributes for the name and version of the service
             .AddService("MyService-API", serviceVersion: "1.0.0")
             // add custom attributes
             .AddAttributes(new Dictionary<string, object>
             {
                 ["host.name"] = System.Environment.MachineName,
                 ["os.description"] = RuntimeInformation.OSDescription,
                 ["deployment.environment"] = Environment.EnvironmentName.ToLowerInvariant(),
             }) ;

             services.AddOpenTelemetry().UseAzureMonitor(opt=>opt.ConnectionString = "InstrumentationKey=XXXX")
             .WithTracing(builder => builder.SetSampler(new TraceIdRatioBasedSampler(0.6))
             .AddAspNetCoreInstrumentation()
                 .AddHttpClientInstrumentation()
                 .AddSource("MyService-API")
                 .SetResourceBuilder(
                     resourceBuilder)
                 )
             .WithMetrics(b
             => b.AddAspNetCoreInstrumentation()
             .AddMeter("Microsoft.AspNetCore.Hosting")
             .AddMeter("Microsoft.AspNetCore.Server.IISIntegration")
             .AddRuntimeInstrumentation()
              
                 );
                 }

Expected behavior

Telemetry is successfully sent to Azure Application Insight

Actual behavior

traces, metrics and logs are not being sent to Azure Application Insight

Reproduction Steps

Create api project with NetCore 2.1
Add the packages mentioned in the description
Add configuration on Startup.cd class mentioned in the description.
Run application.

Environment

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win10-x64

NET CORE 2.1
Visual Studio 2022 V17.5.4

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 21, 2023
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Monitor - Exporter Monitor OpenTelemetry Exporter CXP Attention and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Jul 21, 2023
@github-actions
Copy link

Thank you for your feedback. This has been routed to the support team for assistance.

@TimothyMothra
Copy link
Contributor

Thank you for reporting this!

I've never seen a dotnet version string like that before! Are you doing anything unique or custom with your .NET runtime?

"dotnet4.6.30411.01 @BuiltBy: AzDevOps-vs2017b17000759 @Branch: release/2.1-MSRC @srccode: https://github.com/dotnet/coreclr/tree/f6b4d10f1b98 94c9336c514c7ee6cff5c82535fe"

@navba-MSFT navba-MSFT added needs-author-feedback Workflow: More information is needed from author to address the issue. and removed needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Jul 24, 2023
@github-actions
Copy link

Hi @makinsc. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

@makinsc
Copy link
Author

makinsc commented Jul 24, 2023

Hi @TimothyMothra , thanks for your quick response. Nothing special in my .NET Runtime neither my API core 2.1 project.
Any idea what can I review in order to understand this SDK Version? Any idea how can we solve this problem? Thanks in advance.

@github-actions github-actions bot added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. labels Jul 24, 2023
@navba-MSFT navba-MSFT self-assigned this Jul 25, 2023
@navba-MSFT
Copy link
Contributor

@makinsc The PR #37807 has been filed by @TimothyMothra to fix this. It is currently under review.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants