Fix transcoder service name in otel (#1165)

This commit is contained in:
2025-11-19 20:27:50 +01:00
committed by GitHub
parent d1d6fa9556
commit 27d25f4829
2 changed files with 3 additions and 4 deletions

View File

@@ -1,6 +1,5 @@
import type { ObjectOptions } from "@sinclair/typebox";
import { type TSchema, t } from "elysia";
import { buildUrl } from "~/utils";
import { generateAfter } from "./keyset-paginate";
import type { Sort } from "./sort";

View File

@@ -31,7 +31,7 @@ func setupOtel(e *echo.Echo) (func(), error) {
res, err := resource.New(
ctx,
resource.WithAttributes(semconv.ServiceNameKey.String("kyoo.auth")),
resource.WithAttributes(semconv.ServiceNameKey.String("kyoo.transcoder")),
resource.WithFromEnv(),
resource.WithTelemetrySDK(),
resource.WithProcess(),
@@ -90,8 +90,8 @@ func setupOtel(e *echo.Echo) (func(), error) {
)
otel.SetTracerProvider(tp)
e.Use(otelecho.Middleware("kyoo.auth", otelecho.WithSkipper(func(c echo.Context) bool {
return c.Path() == "/auth/health" || c.Path() == "/auth/ready"
e.Use(otelecho.Middleware("kyoo.transcoder", otelecho.WithSkipper(func(c echo.Context) bool {
return c.Path() == "/video/health" || c.Path() == "/video/ready"
})))
return func() {