Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions otel-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,27 @@ cumulative export; `raw-buffer` keeps every event as its own data point
| `config-countsketch.yaml` | CountSketch |
| `config-countminsketch.yaml` | CountMinSketch |
| `config-baseline.yaml` | none (raw Sum/LastValue) |

## Fake backend sink (`sink/`)

`sink` stands in for the backend while it cannot ingest the Collector's
output. It only receives: it counts what arrives, discards it, and prints
totals on SIGINT/SIGTERM (and every `-stats-every` if set).

```bash
go run ./sink -grpc :4317 -http :10908 [-dump-dir /path] [-stats-every 30s]
```

- **OTLP/gRPC** (`-grpc`): point an OTLP exporter (the edge Collector or
otel-app `-target`) here. Sketch metrics are counted per sketch kind and
data-point encoding (`*Delta` encodings are deltas, the rest full state):
`SINK_SKETCH kind= encoding= mode= msgs= bytes=`. Plain points keep the
`SINK_STATS reqs= datapoints= bytes=` line.
- **HTTP `POST /ingest/gorilla`** (`-http`): point `cold.ship_endpoint` here.
The gzipped ASAPFRG1 fragment frame is decoded to count
`SINK_RAW reqs= gzip_bytes= bytes= fragments= series= samples=`.
- `-dump-dir`: write each request body to
`<receive-unix-ns>-<otlp|gorilla>-<seq>.bin` for offline comparison of
sketch answers with exact answers from the raw samples. Gorilla bodies are
stored as received (gzipped); OTLP bodies are the
`ExportMetricsServiceRequest` protobuf.
83 changes: 78 additions & 5 deletions otel-app/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,112 @@ module github.com/approx-telemetry/otel-app
go 1.25.0

require (
github.com/ProjectASAP/asap-gorilla-go v0.0.0-00010101000000-000000000000
github.com/ProjectASAP/asap-precompute-go v0.0.0-00010101000000-000000000000
github.com/ProjectASAP/asap-precompute-go/monitor/grpcclient v0.0.0-00010101000000-000000000000
github.com/ProjectASAP/sketchlib-go v0.0.0-20260903015955-4b0919d3d653
go.opentelemetry.io/collector/pdata v1.42.0
go.opentelemetry.io/otel v1.43.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.41.0
go.opentelemetry.io/otel/metric v1.43.0
go.opentelemetry.io/otel/sdk v1.41.0
go.opentelemetry.io/otel/sdk/metric v1.41.0
go.opentelemetry.io/proto/otlp v1.9.0
go.yaml.in/yaml/v2 v2.4.3
google.golang.org/grpc v1.79.1
google.golang.org/protobuf v1.36.11
)

replace (
github.com/ProjectASAP/asap-gorilla-go => ../asap-gorilla-go
github.com/ProjectASAP/asap-precompute-go => ../asap-precompute-go
github.com/ProjectASAP/asap-precompute-go/monitor/grpcclient => ../asap-precompute-go/monitor/grpcclient
)

require (
github.com/ProjectASAP/sketchlib-go v0.0.0-20260903015955-4b0919d3d653 // indirect
cloud.google.com/go/auth v0.16.5 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
cloud.google.com/go/compute/metadata v0.9.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.12.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0 // indirect
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
github.com/aws/aws-sdk-go-v2 v1.41.7 // indirect
github.com/aws/aws-sdk-go-v2/config v1.31.12 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.18.16 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.23 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.23 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.23 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 // indirect
github.com/aws/smithy-go v1.25.1 // indirect
github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/colega/zeropool v0.0.0-20230505084239-6fb4a4f75381 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dennwc/varint v1.0.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang-jwt/jwt/v5 v5.3.0 // indirect
github.com/golang/snappy v1.0.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/oklog/ulid/v2 v2.1.1 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.23.2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.66.1 // indirect
github.com/prometheus/prometheus v0.307.1 // indirect
github.com/prometheus/common v0.67.1 // indirect
github.com/prometheus/otlptranslator v1.0.0 // indirect
github.com/prometheus/procfs v0.16.1 // indirect
github.com/prometheus/prometheus v0.307.3 // indirect
github.com/prometheus/sigv4 v0.2.1 // indirect
github.com/stretchr/testify v1.11.1 // indirect
github.com/zeebo/xxh3 v1.1.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/collector/featuregate v1.47.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/goleak v1.3.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.48.0 // indirect
golang.org/x/exp v0.0.0-20250808145144-a408d31f581a // indirect
golang.org/x/net v0.50.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.41.0 // indirect
golang.org/x/text v0.34.0 // indirect
golang.org/x/time v0.13.0 // indirect
google.golang.org/api v0.250.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260209200024-4cfbd4190f57 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apimachinery v0.34.1 // indirect
k8s.io/client-go v0.34.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
)

// The `opentelemetry-go` submodule is kept in the repo with
Expand All @@ -55,6 +124,10 @@ require (
// is `../../sketchlib-go` — matching the path opentelemetry-app used.
replace (
github.com/ProjectASAP/sketchlib-go => ../../sketchlib-go
// The sink decodes OTLP with the patched pdata (the same module the
// asapedgeprocessor encodes with), which carries the SumAgg variant
// the patched proto bindings above do not.
go.opentelemetry.io/collector/pdata => ../opentelemetry-collector/pdata
go.opentelemetry.io/otel => ../opentelemetry-go
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc => ../opentelemetry-go/exporters/otlp/otlpmetric/otlpmetricgrpc
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp => ../opentelemetry-go/exporters/otlp/otlpmetric/otlpmetrichttp
Expand Down
Loading
Loading