good morning!!!!

Skip to content
Snippets Groups Projects
Commit 092c1ed3 authored by Thomas Guinther's avatar Thomas Guinther
Browse files

start adding tracing

parent 40e9fd97
Branches tomg_tracing
Tags
No related merge requests found
Pipeline #91250 passed
Pipeline: pggat

#91258

    ......@@ -3,6 +3,9 @@ package spool
    import (
    "context"
    "gfx.cafe/gfx/pggat/lib/fed/middlewares/tracing"
    "go.opentelemetry.io/otel"
    "go.opentelemetry.io/otel/attribute"
    "go.opentelemetry.io/otel/trace"
    "sync"
    "time"
    ......@@ -30,6 +33,8 @@ type Pool struct {
    serversByID map[uuid.UUID]*Server
    serversByConn map[*fed.Conn]*Server
    mu sync.RWMutex
    tracer trace.Tracer
    }
    // MakePool will create a new pool with config. ScaleLoop must be called if this is used instead of NewPool
    ......@@ -45,6 +50,9 @@ func MakePool(config Config) Pool {
    Critics: config.Critics,
    Logger: config.Logger,
    }),
    tracer: otel.Tracer("spool", trace.WithInstrumentationAttributes(
    attribute.String("component", "gfx.cafe/gfx/pggat/lib/gat/handlers/pool/spool/pool.go"),
    )),
    }
    }
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment