opentelemetry-instrumentation-openai-v2 has a configuration that results in log events missing a body. Specifically this is when OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false.
Right now, these aren't processed properly and result in an error in the console.
Expected Behavior
log events without a body, should be processed and result in a row saying either nothing for the "message" or something like N/A
Steps To Reproduce
send a message like this to aspire's grpc endpoint
info: Aspire.Dashboard.Otlp.Storage.TelemetryRepository[0]
Error adding log entry.
System.NullReferenceException: Object reference not set to an instance of an object.
at Aspire.Dashboard.Otlp.Model.OtlpHelpers.GetString(AnyValue value) in /_/src/Aspire.Dashboard/Otlp/Model/OtlpHelpers.cs:line 96
at Aspire.Dashboard.Otlp.Model.OtlpLogEntry..ctor(LogRecord record, OtlpApplicationView logApp, OtlpScope scope, OtlpContext context) in /_/src/Aspire.Dashboard/Otlp/Model/OtlpLogEntry.cs:line 55
at Aspire.Dashboard.Otlp.Storage.TelemetryRepository.AddLogsCore(AddContext context, OtlpApplicationView applicationView, RepeatedField`1 scopeLogs) in /_/src/Aspire.Dashboard/Otlp/Storage/TelemetryRepository.cs:line 320
.NET Version info
No response
Anything else?
I used docker run --rm -it -p 18888:18888 -p 4317:18889 --name aspire-dashboard mcr.microsoft.com/dotnet/aspire-dashboard:9.0
Is there an existing issue for this?
Describe the bug
opentelemetry-instrumentation-openai-v2 has a configuration that results in log events missing a body. Specifically this is when
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false
.Right now, these aren't processed properly and result in an error in the console.
Expected Behavior
log events without a body, should be processed and result in a row saying either nothing for the "message" or something like N/A
Steps To Reproduce
send a message like this to aspire's grpc endpoint
Exceptions (if any)
.NET Version info
No response
Anything else?
I used
docker run --rm -it -p 18888:18888 -p 4317:18889 --name aspire-dashboard mcr.microsoft.com/dotnet/aspire-dashboard:9.0