Skip to content

Commit

Permalink
Merge branch 'main' into collector-tlscfg
Browse files Browse the repository at this point in the history
  • Loading branch information
chahatsagarmain authored Dec 7, 2024
2 parents 8b074ac + 65cff3c commit bd8acca
Show file tree
Hide file tree
Showing 160 changed files with 2,740 additions and 1,260 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-docker-hotrod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
esac
- name: Install kubectl
if: matrix.runtime == 'k8s'
uses: azure/setup-kubectl@v3
uses: azure/setup-kubectl@v4
with:
version: 'latest'

Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/ci-e2e-cassandra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@ jobs:
fail-fast: false
matrix:
jaeger-version: [v1, v2]
create-schema: [manual, auto]
version:
- distribution: cassandra
major: 4.x
schema: v004
- distribution: cassandra
major: 5.x
schema: v004
name: ${{ matrix.version.distribution }} ${{ matrix.version.major }} ${{ matrix.jaeger-version }}
exclude:
# Exclude v1 as create schema on fly is available for v2 only
- jaeger-version: v1
create-schema: auto
name: ${{ matrix.version.distribution }}-${{ matrix.version.major }} ${{ matrix.jaeger-version }} schema=${{ matrix.create-schema }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
Expand All @@ -45,9 +50,11 @@ jobs:
- name: Run cassandra integration tests
id: test-execution
run: bash scripts/cassandra-integration-test.sh ${{ matrix.version.major }} ${{ matrix.version.schema }} ${{ matrix.jaeger-version }}
env:
SKIP_APPLY_SCHEMA: ${{ matrix.create-schema == 'auto' && true || false }}

- name: Upload coverage to codecov
uses: ./.github/actions/upload-codecov
with:
files: cover.out
flags: cassandra-${{ matrix.version.major }}-${{ matrix.jaeger-version }}
flags: cassandra-${{ matrix.version.major }}-${{ matrix.jaeger-version }}-${{ matrix.create-schema }}
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: 'Dependency Review'
uses: actions/dependency-review-action@4081bf99e2866ebe428fc0477b69eb4fcda7220a # v4.4.0
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
5 changes: 4 additions & 1 deletion .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ packages:
github.com/jaegertracing/jaeger/storage/dependencystore:
interfaces:
Reader:
github.com/jaegertracing/jaeger/storage/metricsstore:
github.com/jaegertracing/jaeger/storage/metricstore:
config:
all: true
github.com/jaegertracing/jaeger/storage/samplingstore:
Expand All @@ -73,3 +73,6 @@ packages:
github.com/jaegertracing/jaeger/storage/spanstore:
config:
all: true
github.com/jaegertracing/jaeger/storage_v2/tracestore:
config:
all: true
66 changes: 65 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,70 @@ copy from UI changelog

</details>

v1.64.0 / v2.1.0 (2024-12-06)
-------------------------------

### Backend Changes

#### ⛔ Breaking Changes

* [metrics][storage] move metrics reader decorator to metrics storage factory ([@mahadzaryab1](/~https://github.com/mahadzaryab1) in [#6287](/~https://github.com/jaegertracing/jaeger/pull/6287))
* [v2][storage] move span reader decorator to storage factories ([@mahadzaryab1](/~https://github.com/mahadzaryab1) in [#6280](/~https://github.com/jaegertracing/jaeger/pull/6280))

#### ✨ New Features

* [v2][storage] implement read path for v2 storage interface ([@mahadzaryab1](/~https://github.com/mahadzaryab1) in [#6170](/~https://github.com/jaegertracing/jaeger/pull/6170))
* Create cassandra db schema on session initialization ([@akstron](/~https://github.com/akstron) in [#5922](/~https://github.com/jaegertracing/jaeger/pull/5922))

#### 🐞 Bug fixes, Minor Improvements

* Fix password in integration test ([@akstron](/~https://github.com/akstron) in [#6284](/~https://github.com/jaegertracing/jaeger/pull/6284))
* [cassandra] change compaction window default to 2hrs ([@yurishkuro](/~https://github.com/yurishkuro) in [#6282](/~https://github.com/jaegertracing/jaeger/pull/6282))
* Improve telemetry.settings ([@yurishkuro](/~https://github.com/yurishkuro) in [#6275](/~https://github.com/jaegertracing/jaeger/pull/6275))
* [kafka] otel helper instead of tlscfg package ([@chahatsagarmain](/~https://github.com/chahatsagarmain) in [#6270](/~https://github.com/jaegertracing/jaeger/pull/6270))
* [refactor] fix package misspelling: telemetery->telemetry ([@yurishkuro](/~https://github.com/yurishkuro) in [#6269](/~https://github.com/jaegertracing/jaeger/pull/6269))
* [prometheus] use otel helper instead of tlscfg package ([@chahatsagarmain](/~https://github.com/chahatsagarmain) in [#6266](/~https://github.com/jaegertracing/jaeger/pull/6266))
* [fix] use metrics decorator around metricstorage ([@yurishkuro](/~https://github.com/yurishkuro) in [#6262](/~https://github.com/jaegertracing/jaeger/pull/6262))
* Use real metrics factory instead of nullfactory ([@yurishkuro](/~https://github.com/yurishkuro) in [#6261](/~https://github.com/jaegertracing/jaeger/pull/6261))
* [v2] use only version number for buildinfo ([@yurishkuro](/~https://github.com/yurishkuro) in [#6260](/~https://github.com/jaegertracing/jaeger/pull/6260))
* [refactor] move spm v2 config to cmd/jaeger/ with all other configs ([@yurishkuro](/~https://github.com/yurishkuro) in [#6256](/~https://github.com/jaegertracing/jaeger/pull/6256))
* [es-index-cleaner] use otel helper instead of tlscfg ([@chahatsagarmain](/~https://github.com/chahatsagarmain) in [#6259](/~https://github.com/jaegertracing/jaeger/pull/6259))
* [api_v2] change time fields in archivetracerequest to non-nullable ([@rim99](/~https://github.com/rim99) in [#6251](/~https://github.com/jaegertracing/jaeger/pull/6251))
* [es-rollover] use otel helpers for tls config instead of tlscfg ([@chahatsagarmain](/~https://github.com/chahatsagarmain) in [#6238](/~https://github.com/jaegertracing/jaeger/pull/6238))
* Enable usestdlibvars linter ([@mmorel-35](/~https://github.com/mmorel-35) in [#6249](/~https://github.com/jaegertracing/jaeger/pull/6249))
* [storage_v1] add time window to gettracerequest ([@rim99](/~https://github.com/rim99) in [#6244](/~https://github.com/jaegertracing/jaeger/pull/6244))
* [fix][query] fix misconfiguration in tls settings from using otel http helper ([@mahadzaryab1](/~https://github.com/mahadzaryab1) in [#6239](/~https://github.com/jaegertracing/jaeger/pull/6239))
* Auto-generate gogo annotations for api_v3 ([@yurishkuro](/~https://github.com/yurishkuro) in [#6233](/~https://github.com/jaegertracing/jaeger/pull/6233))
* Use confighttp in expvar extension ([@yurishkuro](/~https://github.com/yurishkuro) in [#6227](/~https://github.com/jaegertracing/jaeger/pull/6227))
* Parameterize listen host and override when in container ([@yurishkuro](/~https://github.com/yurishkuro) in [#6231](/~https://github.com/jaegertracing/jaeger/pull/6231))
* Remove 0.0.0.0 overrides in hotrod ci ([@yurishkuro](/~https://github.com/yurishkuro) in [#6226](/~https://github.com/jaegertracing/jaeger/pull/6226))
* [storage][v2] add reader adapter that just exposes the underlying v1 reader ([@mahadzaryab1](/~https://github.com/mahadzaryab1) in [#6221](/~https://github.com/jaegertracing/jaeger/pull/6221))
* Change start/end time in gettrace request to not be pointers ([@yurishkuro](/~https://github.com/yurishkuro) in [#6218](/~https://github.com/jaegertracing/jaeger/pull/6218))
* Pass real meterprovider to components ([@chahatsagarmain](/~https://github.com/chahatsagarmain) in [#6173](/~https://github.com/jaegertracing/jaeger/pull/6173))
* [v2] update versions in readme ([@yurishkuro](/~https://github.com/yurishkuro) in [#6206](/~https://github.com/jaegertracing/jaeger/pull/6206))
* Fix: testcreatecollectorproxy unit test failing on go-tip ([@Saumya40-codes](/~https://github.com/Saumya40-codes) in [#6204](/~https://github.com/jaegertracing/jaeger/pull/6204))
* Respect environment variables when creating internal tracer ([@akstron](/~https://github.com/akstron) in [#6179](/~https://github.com/jaegertracing/jaeger/pull/6179))

#### 🚧 Experimental Features

* [v2]add script for metrics markdown table ([@vvs-personalstash](/~https://github.com/vvs-personalstash) in [#5941](/~https://github.com/jaegertracing/jaeger/pull/5941))

#### 👷 CI Improvements

* Allow using different container runtime ([@rim99](/~https://github.com/rim99) in [#6247](/~https://github.com/jaegertracing/jaeger/pull/6247))
* K8s integration test for hotrod ([@chahatsagarmain](/~https://github.com/chahatsagarmain) in [#6155](/~https://github.com/jaegertracing/jaeger/pull/6155))
* Pass username/password to cassandra docker-compose health check ([@akstron](/~https://github.com/akstron) in [#6214](/~https://github.com/jaegertracing/jaeger/pull/6214))
* [fix][ci] change the prometheus healthcheck endpoint ([@mahadzaryab1](/~https://github.com/mahadzaryab1) in [#6217](/~https://github.com/jaegertracing/jaeger/pull/6217))

### 📊 UI Changes

#### 🐞 Bug fixes, Minor Improvements

* Add new formatting function "add" ([@drewcorlin1](/~https://github.com/drewcorlin1) in [#2507](/~https://github.com/jaegertracing/jaeger-ui/pull/2507))
* Add pad_start link formatting function #2505 ([@drewcorlin1](/~https://github.com/drewcorlin1) in [#2504](/~https://github.com/jaegertracing/jaeger-ui/pull/2504))
* Allow formatting link parameter values as iso date #2487 ([@drewcorlin1](/~https://github.com/drewcorlin1) in [#2501](/~https://github.com/jaegertracing/jaeger-ui/pull/2501))


v1.63.0 / v2.0.0 (2024-11-10)
-------------------------------

Expand Down Expand Up @@ -263,7 +327,7 @@ Dependencies upgrades only.

#### 🚧 Experimental Features

* Implement telemetery struct for v1 components initialization ([@Wise-Wizard](/~https://github.com/Wise-Wizard) in [#5695](/~https://github.com/jaegertracing/jaeger/pull/5695))
* Implement telemetry struct for v1 components initialization ([@Wise-Wizard](/~https://github.com/Wise-Wizard) in [#5695](/~https://github.com/jaegertracing/jaeger/pull/5695))
* Support default configs for storage backends ([@yurishkuro](/~https://github.com/yurishkuro) in [#5691](/~https://github.com/jaegertracing/jaeger/pull/5691))
* Simplify configs organization ([@yurishkuro](/~https://github.com/yurishkuro) in [#5690](/~https://github.com/jaegertracing/jaeger/pull/5690))
* Create metrics.factory adapter for otel metrics ([@Wise-Wizard](/~https://github.com/Wise-Wizard) in [#5661](/~https://github.com/jaegertracing/jaeger/pull/5661))
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ Here are the release managers for future versions with the tentative release dat
| Version | Release Manager | Tentative release date |
|---------|-----------------|------------------------|
| 1.64.0 | @joe-elliott | 4 December 2024 |
| 1.65.0 | @jkowall | 8 January 2025 |
| 1.66.0 | @yurishkuro | 3 February 2025 |
| 1.67.0 | @albertteoh | 5 March 2025 |
| 1.68.0 | @pavolloffay | 5 April 2025 |
| 1.69.0 | @joe-elliott | 7 May 2025 |
66 changes: 31 additions & 35 deletions cmd/all-in-one/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import (

"github.com/spf13/cobra"
"github.com/spf13/viper"
"go.opentelemetry.io/collector/config/configtelemetry"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/noop"
noopmetric "go.opentelemetry.io/otel/metric/noop"
_ "go.uber.org/automaxprocs"
"go.uber.org/zap"

Expand All @@ -33,17 +31,16 @@ import (
"github.com/jaegertracing/jaeger/pkg/config"
"github.com/jaegertracing/jaeger/pkg/jtracer"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/pkg/telemetery"
"github.com/jaegertracing/jaeger/pkg/telemetry"
"github.com/jaegertracing/jaeger/pkg/tenancy"
"github.com/jaegertracing/jaeger/pkg/version"
metricsPlugin "github.com/jaegertracing/jaeger/plugin/metrics"
"github.com/jaegertracing/jaeger/plugin/metricstore"
ss "github.com/jaegertracing/jaeger/plugin/sampling/strategyprovider"
"github.com/jaegertracing/jaeger/plugin/storage"
"github.com/jaegertracing/jaeger/ports"
"github.com/jaegertracing/jaeger/storage/dependencystore"
"github.com/jaegertracing/jaeger/storage/metricsstore/metricstoremetrics"
"github.com/jaegertracing/jaeger/storage/spanstore"
"github.com/jaegertracing/jaeger/storage/spanstore/spanstoremetrics"
"github.com/jaegertracing/jaeger/storage_v2/factoryadapter"
"github.com/jaegertracing/jaeger/storage_v2/tracestore"
)

// all-in-one/main is a standalone full-stack jaeger backend, backed by a memory store
Expand All @@ -68,8 +65,8 @@ func main() {
log.Fatalf("Cannot initialize sampling strategy factory: %v", err)
}

fc := metricsPlugin.FactoryConfigFromEnv()
metricsReaderFactory, err := metricsPlugin.NewFactory(fc)
fc := metricstore.FactoryConfigFromEnv()
metricsReaderFactory, err := metricstore.NewFactory(fc)
if err != nil {
log.Fatalf("Cannot initialize metrics store factory: %v", err)
}
Expand All @@ -95,12 +92,21 @@ by default uses only in-memory database.`,
logger.Fatal("Failed to initialize tracer", zap.Error(err))
}

baseTelset := telemetry.Settings{
Logger: svc.Logger,
TracerProvider: tracer.OTEL,
Metrics: baseFactory,
MeterProvider: noopmetric.NewMeterProvider(),
ReportStatus: telemetry.HCAdapter(svc.HC()),
}

storageFactory.InitFromViper(v, logger)
if err := storageFactory.Initialize(baseFactory, logger); err != nil {
if err := storageFactory.Initialize(baseTelset.Metrics, baseTelset.Logger); err != nil {
logger.Fatal("Failed to init storage factory", zap.Error(err))
}

spanReader, err := storageFactory.CreateSpanReader()
v2Factory := factoryadapter.NewFactory(storageFactory)
traceReader, err := v2Factory.CreateTraceReader()
if err != nil {
logger.Fatal("Failed to create span reader", zap.Error(err))
}
Expand All @@ -113,7 +119,7 @@ by default uses only in-memory database.`,
logger.Fatal("Failed to create dependency reader", zap.Error(err))
}

metricsQueryService, err := createMetricsQueryService(metricsReaderFactory, v, logger, queryMetricsFactory)
metricsQueryService, err := createMetricsQueryService(metricsReaderFactory, v, baseTelset)
if err != nil {
logger.Fatal("Failed to create metrics reader", zap.Error(err))
}
Expand Down Expand Up @@ -159,20 +165,13 @@ by default uses only in-memory database.`,
log.Fatal(err)
}

telset := telemetery.Setting{
Logger: svc.Logger,
TracerProvider: tracer.OTEL,
Metrics: queryMetricsFactory,
ReportStatus: telemetery.HCAdapter(svc.HC()),
LeveledMeterProvider: func(_ configtelemetry.Level) metric.MeterProvider {
return noop.NewMeterProvider()
},
}
// query
queryTelset := baseTelset // copy
queryTelset.Metrics = queryMetricsFactory
querySrv := startQuery(
svc, qOpts, qOpts.BuildQueryServiceOptions(storageFactory, logger),
spanReader, dependencyReader, metricsQueryService,
tm, telset,
traceReader, dependencyReader, metricsQueryService,
tm, queryTelset,
)

svc.RunAndThen(func() {
Expand Down Expand Up @@ -218,14 +217,13 @@ func startQuery(
svc *flags.Service,
qOpts *queryApp.QueryOptions,
queryOpts *querysvc.QueryServiceOptions,
spanReader spanstore.Reader,
traceReader tracestore.Reader,
depReader dependencystore.Reader,
metricsQueryService querysvc.MetricsQueryService,
tm *tenancy.Manager,
telset telemetery.Setting,
telset telemetry.Settings,
) *queryApp.Server {
spanReader = spanstoremetrics.NewReaderDecorator(spanReader, telset.Metrics)
qs := querysvc.NewQueryService(spanReader, depReader, *queryOpts)
qs := querysvc.NewQueryService(traceReader, depReader, *queryOpts)

server, err := queryApp.NewServer(context.Background(), qs, metricsQueryService, qOpts, tm, telset)
if err != nil {
Expand All @@ -239,22 +237,20 @@ func startQuery(
}

func createMetricsQueryService(
metricsReaderFactory *metricsPlugin.Factory,
metricsReaderFactory *metricstore.Factory,
v *viper.Viper,
logger *zap.Logger,
metricsReaderMetricsFactory metrics.Factory,
telset telemetry.Settings,
) (querysvc.MetricsQueryService, error) {
if err := metricsReaderFactory.Initialize(logger); err != nil {
if err := metricsReaderFactory.Initialize(telset); err != nil {
return nil, fmt.Errorf("failed to init metrics reader factory: %w", err)
}

// Ensure default parameter values are loaded correctly.
metricsReaderFactory.InitFromViper(v, logger)
metricsReaderFactory.InitFromViper(v, telset.Logger)
reader, err := metricsReaderFactory.CreateMetricsReader()
if err != nil {
return nil, fmt.Errorf("failed to create metrics reader: %w", err)
}

// Decorate the metrics reader with metrics instrumentation.
return metricstoremetrics.NewReaderDecorator(reader, metricsReaderMetricsFactory), nil
return reader, nil
}
6 changes: 4 additions & 2 deletions cmd/anonymizer/app/query/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ import (
"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/metrics/disabled"
"github.com/jaegertracing/jaeger/plugin/metricstore/disabled"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
dependencyStoreMocks "github.com/jaegertracing/jaeger/storage/dependencystore/mocks"
"github.com/jaegertracing/jaeger/storage/spanstore"
spanstoremocks "github.com/jaegertracing/jaeger/storage/spanstore/mocks"
"github.com/jaegertracing/jaeger/storage_v2/factoryadapter"
)

var (
Expand Down Expand Up @@ -55,11 +56,12 @@ type testServer struct {

func newTestServer(t *testing.T) *testServer {
spanReader := &spanstoremocks.Reader{}
traceReader := factoryadapter.NewTraceReader(spanReader)
metricsReader, err := disabled.NewMetricsReader()
require.NoError(t, err)

q := querysvc.NewQueryService(
spanReader,
traceReader,
&dependencyStoreMocks.Reader{},
querysvc.QueryServiceOptions{},
)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion cmd/collector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/jaegertracing/jaeger/cmd/internal/status"
"github.com/jaegertracing/jaeger/pkg/config"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/pkg/telemetry"
"github.com/jaegertracing/jaeger/pkg/tenancy"
"github.com/jaegertracing/jaeger/pkg/version"
ss "github.com/jaegertracing/jaeger/plugin/sampling/strategyprovider"
Expand Down Expand Up @@ -63,8 +64,12 @@ func main() {
metricsFactory := baseFactory.Namespace(metrics.NSOptions{Name: "collector"})
version.NewInfoMetrics(metricsFactory)

baseTelset := telemetry.NoopSettings()
baseTelset.Logger = svc.Logger
baseTelset.Metrics = baseFactory

storageFactory.InitFromViper(v, logger)
if err := storageFactory.Initialize(baseFactory, logger); err != nil {
if err := storageFactory.Initialize(baseTelset.Metrics, baseTelset.Logger); err != nil {
logger.Fatal("Failed to init storage factory", zap.Error(err))
}
spanWriter, err := storageFactory.CreateSpanWriter()
Expand Down
Loading

0 comments on commit bd8acca

Please sign in to comment.