Skip to content

Commit

Permalink
Merge branch 'main' into es-init
Browse files Browse the repository at this point in the history
Signed-off-by: Manik Mehta <mehtamanik96@gmail.com>
  • Loading branch information
Manik2708 authored Jan 26, 2025
2 parents 2da40c9 + 6d4d7c4 commit d6599f3
Show file tree
Hide file tree
Showing 122 changed files with 1,439 additions and 1,796 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-lint-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:

- name: Run unit tests for scripts
run: |
SHUNIT2=.tools/shunit2 bash scripts/utils/compute-tags.test.sh
SHUNIT2=.tools/shunit2 bash scripts/utils/run-tests.sh
binary-size-check:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -183,4 +183,4 @@ jobs:
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
with:
path: ./jaeger_binary_size.txt
key: jaeger_binary_size_${{ github.run_id }}
key: jaeger_binary_size_${{ github.run_id }}
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ linters-settings:
desc: "Use errors.Join instead of github.com/hashicorp/go-multierror"
- pkg: go.uber.org/multierr
desc: "Use errors.Join instead of github.com/hashicorp/go-multierror"
- pkg: "github.com/jaegertracing/jaeger/model$"
desc: "Use github.com/jaegertracing/jaeger-idl/model/v1"
- pkg: "github.com/jaegertracing/jaeger/proto-gen/api_v2$"
desc: "Use github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
# crossdock-go provides assert/require similar to stretchr/testify
# but we never want to use them outside of the crossdock tests.
disallow-crossdock:
Expand Down
2 changes: 1 addition & 1 deletion Makefile.Protobuf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PROTO_GOGO_MAPPINGS := $(shell echo \
Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types \
Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types \
Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api \
Mmodel.proto=github.com/jaegertracing/jaeger/model \
Mmodel.proto=github.com/jaegertracing/jaeger-idl/model/v1 \
| $(SED) 's/ */,/g')

OPENMETRICS_PROTO_FILES=$(wildcard model/proto/metrics/*.proto)
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/app/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (
"go.uber.org/zap"
yaml "gopkg.in/yaml.v3"

"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/cmd/agent/app/configmanager"
"github.com/jaegertracing/jaeger/cmd/agent/app/reporter"
"github.com/jaegertracing/jaeger/cmd/agent/app/reporter/grpc"
"github.com/jaegertracing/jaeger/internal/metricstest"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/thrift-gen/jaeger"
"github.com/jaegertracing/jaeger/thrift-gen/zipkincore"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/app/configmanager/grpc/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"google.golang.org/grpc"

"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
)

// ConfigManagerProxy returns sampling decisions from collector over gRPC.
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/app/configmanager/grpc/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/pkg/testutils"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
)

func TestSamplingManager_GetSamplingStrategy(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/app/configmanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package configmanager
import (
"context"

"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
)

// TODO this interface could be moved to pkg/clientcfg, along with grpc proxy,
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/app/configmanager/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package configmanager
import (
"context"

"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
)

// configManagerMetrics holds metrics related to ClientConfigManager
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/app/configmanager/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (

"github.com/stretchr/testify/require"

"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/internal/metricstest"
"github.com/jaegertracing/jaeger/pkg/testutils"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
)

type noopManager struct{}
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/app/reporter/grpc/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"google.golang.org/grpc/credentials"
yaml "gopkg.in/yaml.v3"

"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/internal/metricstest"
"github.com/jaegertracing/jaeger/pkg/discovery"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/thrift-gen/jaeger"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/app/reporter/grpc/collector_proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"go.uber.org/zap"
"google.golang.org/grpc"

"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/internal/metricstest"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/thrift-gen/jaeger"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/app/reporter/grpc/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"google.golang.org/grpc/status"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
zipkin2 "github.com/jaegertracing/jaeger/cmd/collector/app/sanitizer/zipkin"
jConverter "github.com/jaegertracing/jaeger/model/converter/thrift/jaeger"
"github.com/jaegertracing/jaeger/model/converter/thrift/zipkin"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
thrift "github.com/jaegertracing/jaeger/thrift-gen/jaeger"
"github.com/jaegertracing/jaeger/thrift-gen/zipkincore"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/app/reporter/grpc/reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"google.golang.org/grpc/status"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
jThrift "github.com/jaegertracing/jaeger/thrift-gen/jaeger"
"github.com/jaegertracing/jaeger/thrift-gen/zipkincore"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/app/testutils/mock_grpc_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"google.golang.org/grpc"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
)

// GrpcCollector is a mock collector for tests
Expand Down
2 changes: 1 addition & 1 deletion cmd/all-in-one/all_in_one_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
ui "github.com/jaegertracing/jaeger/model/json"
"github.com/jaegertracing/jaeger/ports"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
)

// These tests are only run when the environment variable TEST_MODE=integration is set.
Expand Down
4 changes: 2 additions & 2 deletions cmd/all-in-one/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ by default uses only in-memory database.`,
queryTelset := baseTelset // copy
queryTelset.Metrics = queryMetricsFactory
querySrv := startQuery(
svc, qOpts, qOpts.BuildQueryServiceOptions(storageFactory, logger),
qOpts.BuildQueryServiceOptionsV2(storageFactory, logger),
svc, qOpts, qOpts.BuildQueryServiceOptions(storageFactory.InitArchiveStorage, logger),
qOpts.BuildQueryServiceOptionsV2(storageFactory.InitArchiveStorage, logger),
traceReader, dependencyReader, metricsQueryService,
tm, queryTelset,
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/anonymizer/app/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"google.golang.org/grpc/status"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/storage/spanstore"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/anonymizer/app/query/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
"google.golang.org/grpc"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/cmd/query/app"
"github.com/jaegertracing/jaeger/cmd/query/app/querysvc"
"github.com/jaegertracing/jaeger/plugin/metricstore/disabled"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/storage/spanstore"
spanstoremocks "github.com/jaegertracing/jaeger/storage/spanstore/mocks"
dependencyStoreMocks "github.com/jaegertracing/jaeger/storage_v2/depstore/mocks"
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (
"go.uber.org/zap"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/cmd/collector/app/flags"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
"github.com/jaegertracing/jaeger/internal/metricstest"
"github.com/jaegertracing/jaeger/pkg/healthcheck"
"github.com/jaegertracing/jaeger/pkg/tenancy"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/storage_v2/v1adapter"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/handler/grpc_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"google.golang.org/grpc/status"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
"github.com/jaegertracing/jaeger/pkg/tenancy"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
)

// GRPCHandler implements gRPC CollectorService.
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/handler/grpc_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
"google.golang.org/grpc/metadata"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
"github.com/jaegertracing/jaeger/pkg/tenancy"
"github.com/jaegertracing/jaeger/pkg/testutils"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
)

var _ processor.SpanProcessor = (*mockSpanProcessor)(nil)
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/server/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
"google.golang.org/grpc/health/grpc_health_v1"
"google.golang.org/grpc/reflection"

"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/cmd/collector/app/handler"
samplinggrpc "github.com/jaegertracing/jaeger/internal/sampling/grpc"
"github.com/jaegertracing/jaeger/internal/sampling/samplingstrategy"
"github.com/jaegertracing/jaeger/pkg/telemetry"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
)

// GRPCServerParams to construct a new Jaeger Collector gRPC Server
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/server/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/test/bufconn"

"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/cmd/collector/app/handler"
"github.com/jaegertracing/jaeger/internal/grpctest"
"github.com/jaegertracing/jaeger/pkg/tenancy"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
)

// test wrong port number
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/server/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package server
import (
"context"

"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
)

type mockSamplingProvider struct{}
Expand Down
6 changes: 6 additions & 0 deletions cmd/jaeger/config-remote-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ extensions:
jaeger_query:
storage:
traces: some-storage
traces_archive: another-storage
ui:
config_file: ./cmd/jaeger/config-ui.json

Expand All @@ -34,6 +35,11 @@ extensions:
endpoint: localhost:17271
tls:
insecure: true
another-storage:
grpc:
endpoint: localhost:17272
tls:
insecure: true

receivers:
otlp:
Expand Down
2 changes: 1 addition & 1 deletion cmd/jaeger/internal/extension/jaegerstorage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (cfg *TraceBackend) Unmarshal(conf *confmap.Conf) error {
}
if conf.IsSet("cassandra") {
cfg.Cassandra = &cassandra.Options{
Primary: cassandra.NamespaceConfig{
NamespaceConfig: cassandra.NamespaceConfig{
Configuration: casCfg.DefaultConfiguration(),
Enabled: true,
},
Expand Down
2 changes: 1 addition & 1 deletion cmd/jaeger/internal/extension/jaegerstorage/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ backends:
`)
cfg := createDefaultConfig().(*Config)
require.NoError(t, conf.Unmarshal(cfg))
assert.NotEmpty(t, cfg.TraceBackends["some_storage"].Cassandra.Primary.Connection.Servers)
assert.NotEmpty(t, cfg.TraceBackends["some_storage"].Cassandra.Configuration.Connection.Servers)
}

func TestConfigDefaultElasticsearch(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/jaeger/internal/extension/remotesampling/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"google.golang.org/grpc/health"
"google.golang.org/grpc/health/grpc_health_v1"

"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage"
"github.com/jaegertracing/jaeger/internal/leaderelection"
"github.com/jaegertracing/jaeger/internal/metrics/otelmetrics"
Expand All @@ -28,7 +29,6 @@ import (
"github.com/jaegertracing/jaeger/internal/sampling/samplingstrategy/adaptive"
"github.com/jaegertracing/jaeger/internal/sampling/samplingstrategy/file"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/storage"

Check failure on line 32 in cmd/jaeger/internal/extension/remotesampling/extension.go

View workflow job for this annotation

GitHub Actions / lint

"github.com/jaegertracing/jaeger/storage" imported and not used (typecheck)
"github.com/jaegertracing/jaeger/storage/samplingstore"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage"
"github.com/jaegertracing/jaeger/internal/sampling/samplingstrategy/adaptive"
"github.com/jaegertracing/jaeger/plugin/storage/memory"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
)

func makeStorageExtension(t *testing.T, memstoreName string) component.Host {
Expand Down
9 changes: 7 additions & 2 deletions cmd/jaeger/internal/integration/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,24 @@ import (
"testing"

"github.com/jaegertracing/jaeger/plugin/storage/integration"
"github.com/jaegertracing/jaeger/ports"
)

type GRPCStorageIntegration struct {
E2EStorageIntegration

remoteStorage *integration.RemoteMemoryStorage
remoteStorage *integration.RemoteMemoryStorage
archiveRemoteStorage *integration.RemoteMemoryStorage
}

func (s *GRPCStorageIntegration) initialize(t *testing.T) {
s.remoteStorage = integration.StartNewRemoteMemoryStorage(t)
s.remoteStorage = integration.StartNewRemoteMemoryStorage(t, ports.RemoteStorageGRPC)
s.archiveRemoteStorage = integration.StartNewRemoteMemoryStorage(t, ports.RemoteStorageGRPC+1)
}

func (s *GRPCStorageIntegration) cleanUp(t *testing.T) {
s.remoteStorage.Close(t)
s.archiveRemoteStorage.Close(t)
s.initialize(t)
}

Expand All @@ -37,6 +41,7 @@ func TestGRPCStorage(t *testing.T) {
s.e2eInitialize(t, "grpc")
t.Cleanup(func() {
s.remoteStorage.Close(t)
s.archiveRemoteStorage.Close(t)
})
s.RunSpanStoreTests(t)
}
4 changes: 2 additions & 2 deletions cmd/jaeger/internal/integration/trace_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
"google.golang.org/grpc/status"

"github.com/jaegertracing/jaeger/internal/proto/api_v3"
OTELModel "github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger/pkg/iter"
"github.com/jaegertracing/jaeger/ports"
"github.com/jaegertracing/jaeger/storage/spanstore"
"github.com/jaegertracing/jaeger/storage_v2/tracestore"
"github.com/jaegertracing/jaeger/storage_v2/v1adapter"
)

var (
Expand Down Expand Up @@ -68,7 +68,7 @@ func (r *traceReader) GetTraces(
return func(yield func([]ptrace.Traces, error) bool) {
// api_v3 does not support multi-get, so loop through IDs
for _, idParams := range traceIDs {
idStr := OTELModel.TraceIDFromOTEL(idParams.TraceID).String()
idStr := v1adapter.ToV1TraceID(idParams.TraceID).String()
r.logger.Info("Calling api_v3.GetTrace", zap.String("trace_id", idStr))
stream, err := r.client.GetTrace(ctx, &api_v3.GetTraceRequest{
TraceId: idStr,
Expand Down
Loading

0 comments on commit d6599f3

Please sign in to comment.