Replies: 2 comments 2 replies
-
|
I suppose that you are using GRPC instead of http/protobuf. I would suggest also to upgrade to the latest version of OTel packages. This one + endoint should be configurable onadd OTLP Exporter options. |
Beta Was this translation helpful? Give feedback.
-
|
My mistake was thinking that when the logs were sent that there would be some log messages saying they were sent - like traces and metrics. But I guess logging that you're sending logs may be a bit redundant. Once I verified traces, metrics, and logs were successfully sending to our telemetry destination, I went back and set the default log level to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been trying for two days now to get logs to send - without any success.
I am using a barely modified ASP.NET Core Web API .NET 8.0 project.
UPDATE: I'm now using these SDK packages:
OpenTelemetry.Exporter.OpenTelemetry.Protocol v1.13.1
OpenTelemetry.Extensions.Hosting v1.13.1
OpenTelemetry.Instrumentation.AspNetCore v1.13.0
OpenTelemetry.Instrumentation.Http v1.13.0
OpenTelemetry.Instrumentation.Runtime v1.13.0
I have set the default log-level to "Trace"
so I can see what is being sent. Logs are being sent to the console. In the console logs I can see metrics and traces being sent to the OTEL endpoint:Start processing HTTP request POST https:///v1/metricsorStart processing HTTP request POST https:///v1/traces`But the console logs DO NOT show logs being sent to the OTEL endpoint.
I've tried so many variations:
builder.Services.AddOpenTelemetry().UseOtlpExporter()builder.Services.AddOpenTelemetry().WithLogging(...builder.Services.ConfigureOpenTelemetryLoggerProvider(...var loggerFactory = LoggerFactory.Create(logging => logging.AddOpenTelemetry(...Below is my latest variation that requires the least amount of code to replicate...
Environment variables in the launch configuration (verified these are in the app configuration):
Logging Configuration in appsettings.json:
{ "Logging": { "LogLevel": { "Default": "Trace" } } }With this code in Program.cs I only see metrics trying to be sent:
These are the types of messages I see in the console log for metrics and traces - - nothing for logs:
What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions