Skip to content

Commit

Permalink
Merge branch 'main' into e2e-otlp
Browse files Browse the repository at this point in the history
Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
  • Loading branch information
chahatsagarmain authored Jan 25, 2025
2 parents 1a9f494 + 7168853 commit 11d65ce
Show file tree
Hide file tree
Showing 267 changed files with 1,966 additions and 12,328 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 }}
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ 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"
# 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
15 changes: 2 additions & 13 deletions 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 Expand Up @@ -78,18 +78,12 @@ define proto_compile
endef

.PHONY: proto
proto: proto-model \
proto-api-v2 \
proto-storage-v1 \
proto: proto-storage-v1 \
proto-hotrod \
proto-zipkin \
proto-openmetrics \
proto-api-v3

.PHONY: proto-model
proto-model:
$(call proto_compile, model, idl/proto/api_v2/model.proto)
$(PROTOC) -Imodel/proto --go_out=$(PWD)/model/ model/proto/model_test.proto

API_V2_PATCHED_DIR=proto-gen/.patched/api_v2
.PHONY: patch-api-v2
Expand All @@ -99,11 +93,6 @@ patch-api-v2:
cp idl/proto/api_v2/sampling.proto $(API_V2_PATCHED_DIR)/
cat idl/proto/api_v2/query.proto | $(SED) 's|jaegertracing/jaeger-idl/model/v1.|jaegertracing/jaeger/model.|g' > $(API_V2_PATCHED_DIR)/query.proto

.PHONY: proto-api-v2
proto-api-v2: patch-api-v2
$(call proto_compile, proto-gen/api_v2, $(API_V2_PATCHED_DIR)/query.proto)
$(call proto_compile, proto-gen/api_v2, $(API_V2_PATCHED_DIR)/collector.proto)
$(call proto_compile, proto-gen/api_v2, $(API_V2_PATCHED_DIR)/sampling.proto)

.PHONY: proto-openmetrics
proto-openmetrics:
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 @@ -13,8 +13,8 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/jaegertracing/jaeger-idl/model/v1"
zipkin2 "github.com/jaegertracing/jaeger/cmd/collector/app/sanitizer/zipkin"
"github.com/jaegertracing/jaeger/model"
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"
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 @@ -18,7 +18,7 @@ import (
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"

"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/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 @@ -13,7 +13,7 @@ import (
"github.com/stretchr/testify/require"
"google.golang.org/grpc"

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

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/anonymizer/anonymizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

"go.uber.org/zap"

"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger-idl/model/v1"
uiconv "github.com/jaegertracing/jaeger/model/converter/json"
uimodel "github.com/jaegertracing/jaeger/model/json"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/anonymizer/app/anonymizer/anonymizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

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

var tags = []model.KeyValue{
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 @@ -15,7 +15,7 @@ import (
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/status"

"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/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 @@ -14,9 +14,9 @@ import (
"github.com/stretchr/testify/require"
"google.golang.org/grpc"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/query/app"
"github.com/jaegertracing/jaeger/cmd/query/app/querysvc"
"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger/plugin/metricstore/disabled"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"github.com/jaegertracing/jaeger/storage/spanstore"
Expand Down
2 changes: 1 addition & 1 deletion cmd/anonymizer/app/uiconv/extractor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

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

type UITrace struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/anonymizer/app/uiconv/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

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

func TestModule_TraceSuccess(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/anonymizer/app/writer/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/gogo/protobuf/jsonpb"
"go.uber.org/zap"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/anonymizer/app/anonymizer"
"github.com/jaegertracing/jaeger/model"
)

var ErrMaxSpansCountReached = errors.New("max spans count reached")
Expand Down
2 changes: 1 addition & 1 deletion cmd/anonymizer/app/writer/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

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

var tags = []model.KeyValue{
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import (
"go.uber.org/zap"
"google.golang.org/grpc"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/collector/app/flags"
"github.com/jaegertracing/jaeger/cmd/collector/app/handler"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
"github.com/jaegertracing/jaeger/cmd/collector/app/server"
"github.com/jaegertracing/jaeger/internal/safeexpvar"
"github.com/jaegertracing/jaeger/internal/sampling/samplingstrategy"
"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger/pkg/healthcheck"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/pkg/tenancy"
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 @@ -19,10 +19,10 @@ import (
"go.opentelemetry.io/collector/config/configtls"
"go.uber.org/zap"

"github.com/jaegertracing/jaeger-idl/model/v1"
"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/model"
"github.com/jaegertracing/jaeger/pkg/healthcheck"
"github.com/jaegertracing/jaeger/pkg/tenancy"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
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,8 +14,8 @@ import (
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger/pkg/tenancy"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
)
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 @@ -18,8 +18,8 @@ import (
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/metadata"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger/pkg/tenancy"
"github.com/jaegertracing/jaeger/pkg/testutils"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/handler/thrift_span_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"go.uber.org/zap"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
zipkinS "github.com/jaegertracing/jaeger/cmd/collector/app/sanitizer/zipkin"
"github.com/jaegertracing/jaeger/model"
jConv "github.com/jaegertracing/jaeger/model/converter/thrift/jaeger"
"github.com/jaegertracing/jaeger/model/converter/thrift/zipkin"
"github.com/jaegertracing/jaeger/thrift-gen/jaeger"
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/handler/thrift_span_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"go.opentelemetry.io/collector/pdata/ptrace"
"go.uber.org/zap"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
zipkinsanitizer "github.com/jaegertracing/jaeger/cmd/collector/app/sanitizer/zipkin"
"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger/thrift-gen/jaeger"
"github.com/jaegertracing/jaeger/thrift-gen/zipkincore"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/ptrace"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/pkg/normalizer"
"github.com/jaegertracing/jaeger/pkg/otelsemconv"
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/stretchr/testify/assert"
"go.opentelemetry.io/collector/pdata/ptrace"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
"github.com/jaegertracing/jaeger/internal/metricstest"
"github.com/jaegertracing/jaeger/model"
jaegerM "github.com/jaegertracing/jaeger/pkg/metrics"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/model_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
package app

import (
"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
"github.com/jaegertracing/jaeger/model"
)

// ProcessSpan processes a Domain Model Span
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/model_consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/stretchr/testify/assert"

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

func TestChainedProcessSpan(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ package app
import (
"go.uber.org/zap"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/collector/app/flags"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
"github.com/jaegertracing/jaeger/cmd/collector/app/sanitizer"
"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger/pkg/metrics"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/stretchr/testify/assert"
"go.uber.org/zap"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/collector/app/flags"
"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger/pkg/metrics"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/collector/app/processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"go.opentelemetry.io/collector/pdata/ptrace"

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

var (
Expand All @@ -20,7 +20,7 @@ var (
// Batch is a batch of spans passed to the processor.
type Batch interface {
// GetSpans delegates to the appropriate function based on the data model version.
GetSpans(v1 func(spans []*model.Span), v2 func(traces ptrace.Traces))
GetSpans(sv1 func(spans []*model.Span), sv2 func(traces ptrace.Traces))

GetSpanFormat() SpanFormat
GetInboundTransport() InboundTransport
Expand Down Expand Up @@ -51,8 +51,8 @@ type SpansV2 struct {
Details
}

func (s SpansV1) GetSpans(v1 func([]*model.Span), _ func(ptrace.Traces)) {
v1(s.Spans)
func (s SpansV1) GetSpans(sv1 func([]*model.Span), _ func(ptrace.Traces)) {
sv1(s.Spans)
}

func (s SpansV2) GetSpans(_ func([]*model.Span), v2 func(ptrace.Traces)) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/processor/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert"
"go.opentelemetry.io/collector/pdata/ptrace"

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

func TestDetails(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package sanitizer

import (
"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger-idl/model/v1"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/stretchr/testify/assert"

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

func TestEmptyServiceNameSanitizer(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/sanitizer/sanitizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package sanitizer

import (
"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger-idl/model/v1"
)

// SanitizeSpan sanitizes/normalizes spans. Any business logic that needs to be applied to normalize the contents of a
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/sanitizer/sanitizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/stretchr/testify/assert"

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

func TestNewStandardSanitizers(*testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/sanitizer/service_name_sanitizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
package sanitizer

import (
"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/cmd/collector/app/sanitizer/cache"
"github.com/jaegertracing/jaeger/model"
)

// NewServiceNameSanitizer creates a service name sanitizer.
Expand Down
Loading

0 comments on commit 11d65ce

Please sign in to comment.