Good morning! I'm testing signoz localhost, trying...
# support
r
Good morning! I'm testing signoz localhost, trying to send traces from dotnet. My SigNoz local installation using docker works fine, and the sample apps that send traces are also working fine. My app uses docker and I added the
no-code autoinstrumentation
but it seems like it's not connecting to local signoz. Using libraries is not desirable at this moment, as it would imply a general upgrade of dependencies. What else can I try?
s
How did you configure you app running inside docker to send data to local signoz installation?
r
Thanks for asking back. I set up the auto instrumentation (no-code) script, executed it and set up the ENV variables in the container. This is a separate Docker container, separate from the docker-compose where all the signoz services run (including clickhouse, sample apps, etc)
I set up the auto instrumentation (no-code) script
Copy code
RUN curl --fail -Lo /tmp/otel-dotnet-auto-install.sh \
    <https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/latest/download/otel-dotnet-auto-install.sh>
set up the ENV variables in the container
Copy code
COPY --from=build /tmp/otel-dotnet-auto-install.sh /tmp/otel-dotnet-auto-install.sh
RUN apt-get update && apt-get -y install --no-install-recommends unzip \
    && apt-get -y install --no-install-recommends curl
RUN sh /tmp/otel-dotnet-auto-install.sh
RUN chmod +x $HOME/.otel-dotnet-auto/instrument.sh

ENV OTEL_SERVICE_NAME=my-service
ENV OTEL_EXPORTER_OTLP_PROTOCOL=grpc
ENV OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317

RUN . $HOME/.otel-dotnet-auto/instrument.sh
s
It's probably a networking issue. please make sure the host and port give in OTEL_EXPORTER_OTLP_ENDPOINT are accessible to application. localhost means local network not the host network where signoz is running.
r
just arrived at the same conclusion. I'll post any progress, I think that's it
thank you!
Hi! I come with updates. I tested with other service I own, only this one is in nodejs. The instrumentation works just fine in that case, I'm able to see the service listed and a few traces imported. Coming back to the dotnet service and doing the procedure I mentioned at the beginning the result is: collector is reachable and
troubleshoot checkEndpoint
works as well. But the service does not appear yet in the collector. At least networking is no longer an issue.
Tried to configure the console exporter but I'm significantly constrained by a dependency, so that the earliest opentelemetry library version I can use without forcing me to a general upgrade is
1.6.0
(Current is
1.10.0
). Now, in order to make it work with this version, I would appreciate a tip to configure the console exporter with this API:
builder.Services.ConfigureOpenTelemetryTracerProvider
I was missing
OpenTelemetry.Extensions.Hosting
and
OpenTelemetry.Instrumentation.AspNetCore
. Console exporter finally worked!
Another update: I further added
OpenTelemetry.Exporter.OpenTelemetryProtocol
and little code to configure endpoint and protocol. In the end, I was able to connect to locally hosted signoz collector. Success!