Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OTelSvc ¶
type OTelSvc struct {
traceconnect.UnimplementedTraceServiceHandler
}
func (*OTelSvc) Export ¶
func (*OTelSvc) Export(ctx context.Context, req *connect_go.Request[tracev1.ExportTraceServiceRequest]) (*connect_go.Response[tracev1.ExportTraceServiceResponse], error)
type OTelSvcLogs ¶
type OTelSvcLogs struct {
logsconnect.UnimplementedLogsServiceHandler
}
func (*OTelSvcLogs) Export ¶
func (*OTelSvcLogs) Export(ctx context.Context, req *connect_go.Request[logsv1.ExportLogsServiceRequest]) (*connect_go.Response[logsv1.ExportLogsServiceResponse], error)
type OTelSvcMetrics ¶
type OTelSvcMetrics struct {
logsconnect.UnimplementedLogsServiceHandler
}
func (*OTelSvcMetrics) Export ¶
func (*OTelSvcMetrics) Export(ctx context.Context, req *connect_go.Request[metricsv1.ExportMetricsServiceRequest]) (*connect_go.Response[metricsv1.ExportMetricsServiceResponse], error)
type Otel ¶
type Otel struct { *Config Traces *OTelSvc Logs *OTelSvcLogs Metrics *OTelSvcMetrics }
Receives otel spans, metrics and logs using gRPC protocol. Currently, it just logs to slog - the intent is to provide a circular buffer and allow getting the data for debug and tools.
Similar to `otel-cli server json --endpoint http://0.0.0.0:4318 --stdout` - but for all
Test with
otel-cli span --name "my-span" --start 1622522888 --end 1622523000 --service "my-service" --kind "client" --verbose --endpoint localhost:4317 otel-cli span --name "my-span" --start 1622522888 --end 1622523000 --service "my-service" --kind "client" --verbose --endpoint http://localhost:4318
func (*Otel) HandleHTTP ¶
func (o *Otel) HandleHTTP(writer http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.