Skip to content

Commit

Permalink
Get archive traces for es
Browse files Browse the repository at this point in the history
Signed-off-by: Emmanuel Emonueje Ebenezer <eebenezer949@gmail.com>
  • Loading branch information
ekefan committed Jan 26, 2025
1 parent 8d172a3 commit 1973ffe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 6 additions & 5 deletions plugin/storage/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,12 @@ func (s *StorageIntegration) testArchiveTrace(t *testing.T) {
var actual *model.Trace
found := s.waitForCondition(t, func(_ *testing.T) bool {
var err error
iterTraces := s.ArchiveTraceReader.GetTraces(context.Background(), tracestore.GetTraceParams{TraceID: tID.ToOTELTraceID()})
traces, err := v1adapter.V1TracesFromSeq2(iterTraces)
if len(traces) > 0 {
actual = traces[0]
}
// iterTraces := s.ArchiveTraceReader.GetTraces(context.Background(), tracestore.GetTraceParams{TraceID: tID.ToOTELTraceID()})
// traces, err := v1adapter.V1TracesFromSeq2(iterTraces)
// if len(traces) > 0 {
// actual = traces[0]
// }
actual, err = s.ArchiveTraceReader.(*v1adapter.TraceReader).GetArchiveTraces(context.Background(), tracestore.GetTraceParams{TraceID: tID.ToOTELTraceID()})
return err == nil && len(actual.Spans) >= len(expected.Spans)
})
require.True(t, found)
Expand Down
5 changes: 5 additions & 0 deletions storage_v2/v1adapter/tracereader.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ func (tr *TraceReader) GetTraces(
}
}

func (tr *TraceReader) GetArchiveTraces(ctx context.Context, traceID tracestore.GetTraceParams) (*model.Trace, error) {
tID := model.TraceIDFromOTEL(traceID.TraceID)

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / badger / badger (v1)

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / spm (v1, all-in-one)

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / grpc / grpc (v1)

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / binary-size-check

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / kafka / kafka 3.x v1

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / spm (v2, jaeger)

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v1)

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / crossdock

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / all-in-one (v1)

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-amd64

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-ppc64le

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / docker-images

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-arm64

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v2)

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-arm64

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-amd64

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v1)

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-s390x

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / all-in-one (v2)

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / build-binaries-windows-amd64

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / opensearch / opensearch 1.x v1

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / elasticsearch / elasticsearch 6.x v1

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v2)

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / elasticsearch / elasticsearch 7.x v1

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / elasticsearch / elasticsearch 8.x v1

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / opensearch / opensearch 2.x v1

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / lint

undefined: model.TraceIDFromOTEL) (typecheck)

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / lint

undefined: model.TraceIDFromOTEL) (typecheck)

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / lint

undefined: model.TraceIDFromOTEL) (typecheck)

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / lint

undefined: model.TraceIDFromOTEL) (typecheck)

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / lint

undefined: model.TraceIDFromOTEL) (typecheck)

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / cassandra / cassandra-4.x v1 schema=manual

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / cassandra / cassandra-5.x v1 schema=manual

undefined: model.TraceIDFromOTEL

Check failure on line 69 in storage_v2/v1adapter/tracereader.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: model.TraceIDFromOTEL
return tr.spanReader.GetTrace(ctx, spanstore.GetTraceParameters{TraceID: tID})
}

func (tr *TraceReader) GetServices(ctx context.Context) ([]string, error) {
return tr.spanReader.GetServices(ctx)
}
Expand Down

0 comments on commit 1973ffe

Please sign in to comment.