Wider OpenTelemetry support

Today Squidex only supports OTel logging and only using the OTLP/HTTP protocol spec.

I wish for:

  1. OTel logging that also support using OTLP/gRPC
  2. OTel tracing, support both OTLP/HTTP and OTLP/gRPC
  3. and optionally also OTel metrics if there are any interesting internal metrics that could be useful to expose, also support both OTLP/HTTP and OTLP/gRPC

OTel tracing is needed so I can monitor traces all the way from Squidex, out to the consumer and through the network layers in front.

Have great weekend :slight_smile:

Hi.

What kind of metrics are you looking for exactly? Traces are supported but afaik metrics is always a per-user thing.

OTLP protocol is already supported: squidex/backend/src/Squidex/appsettings.json at master · Squidex/squidex · GitHub

The default is GRPC, btw.

I have not tested it yet, but the following option should alsow work:

LOGGING__OTLP__PROTOCOL=HttpProtobuf
1 Like

Thanks, this lead me to find out the reason why I thought gRPC was not supported. I was using a wrong value for LOGGING__OTLP__ENDPOINT, for testing I’m using Aspire Dashboard standalone in docker like Squidex, so the value needed to be http://aspire-dashboard:18889 and not aspire-dashboard:18889 as I was trying which throws protocol exceptions during startup.

Now I see lots of traces so that this good!

But I do not see any logging at all, it that supported or is it only tracing?

Metrics is not that important for me now that I see tracing works and mongo is traced. But it could be handy with some of basic metrics like mongo latency, call count and the standard ones that “OpenTelemetry.Instrumentation.AspNetCore” and “OpenTelemetry.Instrumentation.Runtime” exposes :slight_smile:

When I implemented that, only tracing was implemented in OpenTelemetry. I can also add logging and metrics. PR would also be very welcome.

If you have a setup with Aspire it would also be super cool, I was thinking about this recently.

1 Like

ah that make sense :slight_smile:

I will create a PR with OTel logging support and some basic ASP.NET Core and runtime metrics.

I’m only using the Aspire Dashboard in standalone mode for local ingest of OTel data: Standalone .NET Aspire dashboard - .NET Aspire | Microsoft Learn. Will look into if that also makes sense to use in the Squidex repo for verifying the OTel integration.

PR for logging and metrics added: https://github.com/Squidex/squidex/pull/1137 :slight_smile: