HelloWorld scope app for OpenTelemetry logging #5798
-
Hi, I'm trying to run OpenTelemetry logging "HelloWorld" scope application exporting logs into the Debug exporter, but still without any luck. I'm on Windows and here are my steps to reproduce it:
# This is a configuration file for the OpenTelemetry Collector intended to be
# used in conjunction with the OTLP Exporter example (see ../TestOtlpExporter.cs)
#
# For more information about the OpenTelemetry Collector see:
# https://github.com/open-telemetry/opentelemetry-collector
#
receivers:
otlp:
protocols:
grpc:
http:
exporters:
debug:
verbosity: detailed
service:
pipelines:
traces:
receivers: [otlp]
exporters: [debug]
metrics:
receivers: [otlp]
exporters: [debug]
logs:
receivers: [otlp]
exporters: [debug]
I get the following output
With the following packages <ItemGroup>
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.9.0" />
</ItemGroup> After hitting the main endpoint, I would expect to see logs in the OTPL collector. Is my expectation incorrect? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yes, your expectation is correct. Are you able to see logs in Console? OTLP Collector is not working due to recent change to Collector I think, which is mentioed in its logs. You can explicitly set endpoint as shown below and that should fix the issue. receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318 |
Beta Was this translation helpful? Give feedback.
Yes, your expectation is correct. Are you able to see logs in Console?
OTLP Collector is not working due to recent change to Collector I think, which is mentioed in its logs. You can explicitly set endpoint as shown below and that should fix the issue.