Skip to content

Commit

Permalink
Update r117 with latest main (#3009)
Browse files Browse the repository at this point in the history
* disable parquet trace index by default (#2990)

* Update parquet-go to include page header caching fix (#2981)

* Tempo: add dedicated columns to block analyze (#2994)

* adde dedicated columns to block analysize

Signed-off-by: Joe Elliott <number101010@gmail.com>

* load

Signed-off-by: Joe Elliott <number101010@gmail.com>

* lint

Signed-off-by: Joe Elliott <number101010@gmail.com>

---------

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Bump jaeger-query docker image to 1.50 (#2998)

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* TraceQL: Experimental "not structural" operators (#2993)

* first pass add

Signed-off-by: Joe Elliott <number101010@gmail.com>

* fix and tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* removed ancestor/descendant due to parsing issues

Signed-off-by: Joe Elliott <number101010@gmail.com>

* added tempodb lvl tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* parse tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* consolidated code

Signed-off-by: Joe Elliott <number101010@gmail.com>

* tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* docs

Signed-off-by: Joe Elliott <number101010@gmail.com>

* changelog

Signed-off-by: Joe Elliott <number101010@gmail.com>

* not ancestor/descendant

Signed-off-by: Joe Elliott <number101010@gmail.com>

* tempodb tests and docs

Signed-off-by: Joe Elliott <number101010@gmail.com>

* remove load

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Apply suggestions from code review

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

---------

Signed-off-by: Joe Elliott <number101010@gmail.com>
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update dskit (#3002)

* Update dskit

* fmt

* Update prometheus to latest release v2.47.1 (c4d1a8b) (#3001)

* Update prometheus to latest release v2.47.1 (c4d1a8b)

I ran
```
go get github.com/prometheus/prometheus@c4d1a8b
```
And fixed any compilation issues

* Checkin .test files from prometheus

* go mod tidy

* More fixes

* Final set of fixes? 🤞

* Lint

---------

Co-authored-by: Mario <mariorvinas@gmail.com>

---------

Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
Co-authored-by: Martin Disibio <martin.disibio@grafana.com>
Co-authored-by: Mario <mariorvinas@gmail.com>
Co-authored-by: Joe Elliott <number101010@gmail.com>
Co-authored-by: Pavol Loffay <p.loffay@gmail.com>
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
  • Loading branch information
6 people authored Oct 11, 2023
1 parent 671d629 commit 3fccf4c
Show file tree
Hide file tree
Showing 541 changed files with 49,721 additions and 10,369 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* [FEATURE] New encoding vParquet3 with support for dedicated attribute columns (@mapno, @stoewer) [#2649](https://github.com/grafana/tempo/pull/2649)
* [FEATURE] Add filtering support to Generic Forwarding [#2742](https://github.com/grafana/tempo/pull/2742) (@Blinkuu)
* [FEATURE] Add cli command to print out summary of large traces [#2775](https://github.com/grafana/tempo/pull/2775) (@ie-pham)
* [FEATURE] Added not structural operators to TraceQL: !>, !<, and !~ [#2993](https://github.com/grafana/tempo/pull/2993) (@joe-elliott)
* [CHANGE] Update Go to 1.21 [#2486](https://github.com/grafana/tempo/pull/2829) (@zalegrala)
* [CHANGE] Make metrics-generator ingestion slack per tenant [#2589](https://github.com/grafana/tempo/pull/2589) (@ie-pham)
* [CHANGE] Moved the tempo_ingester_traces_created_total metric to be incremented when a trace is cut to the wal [#2884](https://github.com/grafana/tempo/pull/2884) (@joe-elliott)
Expand Down
85 changes: 85 additions & 0 deletions cmd/tempo-cli/cmd-analyse-block.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ func resourcePathsForVersion(v string) (string, []string) {
return "", nil
}

func dedicatedColPathForVersion(i int, scope backend.DedicatedColumnScope, v string) string {
switch v {
case vparquet3.VersionString:
return vparquet3.DedicatedResourceColumnPaths[scope][backend.DedicatedColumnTypeString][i]
}
return ""
}

type analyseBlockCmd struct {
backendOptions

Expand Down Expand Up @@ -151,13 +159,35 @@ func processBlock(r backend.Reader, _ backend.Compactor, tenantID, blockID strin
return nil, err
}

// add up dedicated span attribute columns
spanDedicatedSummary, err := aggregateDedicatedColumns(pf, backend.DedicatedColumnScopeSpan, meta)
if err != nil {
return nil, err
}
// merge dedicated with span attributes
for k, v := range spanDedicatedSummary.attributes {
spanAttrsSummary.attributes[k] = v
}
spanAttrsSummary.totalBytes += spanDedicatedSummary.totalBytes

// Aggregate resource attributes
resourceKey, resourceVals := resourcePathsForVersion(meta.Version)
resourceAttrsSummary, err := aggregateAttributes(pf, resourceKey, resourceVals)
if err != nil {
return nil, err
}

// add up dedicated resource attribute columns
resourceDedicatedSummary, err := aggregateDedicatedColumns(pf, backend.DedicatedColumnScopeResource, meta)
if err != nil {
return nil, err
}
// merge dedicated with span attributes
for k, v := range resourceDedicatedSummary.attributes {
resourceAttrsSummary.attributes[k] = v
}
resourceAttrsSummary.totalBytes += spanDedicatedSummary.totalBytes

return &blockSummary{
spanSummary: spanAttrsSummary,
resourceSummary: resourceAttrsSummary,
Expand Down Expand Up @@ -228,6 +258,61 @@ func aggregateAttributes(pf *parquet.File, keyPath string, valuePaths []string)
}, nil
}

func aggregateDedicatedColumns(pf *parquet.File, scope backend.DedicatedColumnScope, meta *backend.BlockMeta) (genericAttrSummary, error) {
attrMap := make(map[string]uint64)
totalBytes := uint64(0)

i := 0
for _, dedColumn := range meta.DedicatedColumns {
if dedColumn.Scope != scope {
continue
}

path := dedicatedColPathForVersion(i, scope, meta.Version)
sz, err := aggregateColumn(pf, path)
if err != nil {
return genericAttrSummary{}, err
}
i++

attrMap["dedicated: "+dedColumn.Name] = sz
totalBytes += sz
}

return genericAttrSummary{
totalBytes: totalBytes,
attributes: attrMap,
}, nil
}

func aggregateColumn(pf *parquet.File, colName string) (uint64, error) {
idx, _ := pq.GetColumnIndexByPath(pf, colName)
calc, err := inspect.NewRowStatCalculator(pf, inspect.RowStatOptions{
Columns: []int{idx},
})
if err != nil {
return 0, err
}

totalBytes := uint64(0)
for {
row, err := calc.NextRow()
if err != nil {
if errors.Is(err, io.EOF) {
break
}
return 0, err
}

cells := row.Cells()

bytes := uint64(cells[1].(int))
totalBytes += bytes
}

return totalBytes, nil
}

func printSummary(scope string, max int, summary genericAttrSummary) error {
// TODO: Support more output formats
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
Expand Down
2 changes: 1 addition & 1 deletion cmd/tempo-query/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jaegertracing/jaeger-query:1.49.0
FROM jaegertracing/jaeger-query:1.50.0

ENV SPAN_STORAGE_TYPE=grpc-plugin \
GRPC_STORAGE_PLUGIN_BINARY=/tempo-query
Expand Down
42 changes: 21 additions & 21 deletions cmd/tempo-serverless/cloud-run/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ require (

require (
cloud.google.com/go v0.110.4 // indirect
cloud.google.com/go/compute v1.20.1 // indirect
cloud.google.com/go/compute v1.22.0 // indirect
cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect
cloud.google.com/go/iam v1.1.0 // indirect
cloud.google.com/go/iam v1.1.2 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 // indirect
Expand All @@ -22,8 +22,8 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0 // indirect
github.com/Azure/azure-storage-blob-go v0.15.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.28 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.21 // indirect
github.com/Azure/go-autorest/autorest v0.11.29 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.5 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
Expand All @@ -48,7 +48,7 @@ require (
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-redis/redis/v8 v8.11.5 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/status v1.1.1 // indirect
Expand All @@ -59,11 +59,11 @@ require (
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.11.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/grafana/dskit v0.0.0-20230926170531-d986a37b92ce // indirect
github.com/grafana/dskit v0.0.0-20231006094724-ad2fd7e7931e // indirect
github.com/grafana/gomemcache v0.0.0-20230914135007-70d78eaabfe1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
Expand All @@ -72,14 +72,14 @@ require (
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/miekg/dns v1.1.50 // indirect
github.com/miekg/dns v1.1.55 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/minio/minio-go/v7 v7.0.52 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
Expand All @@ -94,7 +94,7 @@ require (
github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e // indirect
github.com/opentracing-contrib/go-stdlib v1.0.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/parquet-go/parquet-go v0.17.0 // indirect
github.com/parquet-go/parquet-go v0.18.1-0.20231002172823-4b0ea5ed3565 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
Expand All @@ -104,7 +104,7 @@ require (
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/prometheus/procfs v0.11.0 // indirect
github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rs/xid v1.5.0 // indirect
Expand All @@ -131,24 +131,24 @@ require (
go.opentelemetry.io/collector/semconv v0.86.0 // indirect
go.opentelemetry.io/otel v1.18.0 // indirect
go.opentelemetry.io/otel/trace v1.18.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.1.0 // indirect
golang.org/x/tools v0.7.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.11.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/api v0.132.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect
google.golang.org/grpc v1.58.1 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading

0 comments on commit 3fccf4c

Please sign in to comment.