more
This commit is contained in:
1 parent
8f670dfa2f
commit
2237fbda55
15 files changed
+594
-52
No files matched your search
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"git.tornberg.me/go-otel/internal/websocket"
|
||||
"time"
|
||||
)
|
||||
|
||||
// SearchOptions narrows a Search call beyond the free-text query.
|
||||
@@ -38,6 +39,31 @@ type StatsQuerier interface {
|
||||
ReleaseSeries(ctx context.Context, service string, hours int) (map[string][]StatsPoint, error)
|
||||
// Services lists distinct services seen in the rollup.
|
||||
Services(ctx context.Context) ([]string, error)
|
||||
// EndpointStats groups HTTP spans by normalized request identity and safe
|
||||
// browser metadata. SpanCount exposes proxy/instrumentation duplication;
|
||||
// TraceCount is the better approximation of logical requests.
|
||||
EndpointStats(ctx context.Context, host, service string, hours, limit int) ([]EndpointStat, error)
|
||||
}
|
||||
|
||||
// EndpointStat is a bounded, privacy-conscious HTTP traffic aggregate. Origin
|
||||
// and referer are host-only values; paths and query strings are normalized by
|
||||
// the query so secrets are not returned as part of endpoint diagnostics.
|
||||
type EndpointStat struct {
|
||||
Service string `json:"service"`
|
||||
Host string `json:"host"`
|
||||
Method string `json:"method"`
|
||||
Path string `json:"path"`
|
||||
Route string `json:"route,omitempty"`
|
||||
StatusCode uint16 `json:"statusCode"`
|
||||
UserAgent string `json:"userAgent,omitempty"`
|
||||
OriginHost string `json:"originHost,omitempty"`
|
||||
RefererHost string `json:"refererHost,omitempty"`
|
||||
FetchSite string `json:"fetchSite,omitempty"`
|
||||
FetchMode string `json:"fetchMode,omitempty"`
|
||||
SpanCount uint64 `json:"spanCount"`
|
||||
TraceCount uint64 `json:"traceCount"`
|
||||
FirstSeen time.Time `json:"firstSeen"`
|
||||
LastSeen time.Time `json:"lastSeen"`
|
||||
}
|
||||
|
||||
// TraceSummary is the per-trace rollup shown in overview tables: everything
|
||||
|
||||
Reference in new issue
Block a user