Skip to content

Commit

Permalink
Remove tchannel between agent and collector (#2115)
Browse files Browse the repository at this point in the history
* Remove tchannel between agent and collector

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Update PR number in changelog

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* fmt

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Move section to breaking changes

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
  • Loading branch information
pavolloffay authored Mar 6, 2020
1 parent c328471 commit a9cdc98
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 72 deletions.
41 changes: 19 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@ Changes by Version

#### Breaking Changes

* Remove Tchannel between agent and collector ([#2115](https://github.com/jaegertracing/jaeger/pull/2115), [#2112](https://github.com/jaegertracing/jaeger/pull/2112), [@pavolloffay](https://github.com/pavolloffay))

Remove `Tchannel` port (14267) from collector and `Tchannel` reporter from agent.

These flags were removed from agent:
```
--collector.host-port
--reporter.tchannel.discovery.conn-check-timeout
--reporter.tchannel.discovery.min-peers
--reporter.tchannel.host-port
--reporter.tchannel.report-timeout
```
These flags were removed from collector:
```
--collector.port
```
#### New Features
#### Bug fixes, Minor Improvements
Expand Down Expand Up @@ -1048,25 +1066,4 @@ jaeger_query_responses_bucket{operation="find_traces",le="0.005"} 2

- Add viper/cobra configuration support [#245](https://github.com/uber/jaeger/pull/245) [#307](https://github.com/uber/jaeger/pull/307)
- Add Zipkin /api/v1/spans endpoint [#282](https://github.com/uber/jaeger/pull/282)
- Add basic authenticator to configs for cassandra [#323](https://github.com/uber/jaeger/pull/323)
- Add Elasticsearch storage support


0.5.2 (2017-07-20)
------------------

- Use official Cassandra 3.11 base image [#278](https://github.com/uber/jaeger/pull/278)
- Support configurable metrics backend in the agent [#275](https://github.com/uber/jaeger/pull/275)


0.5.1 (2017-07-03)
------------------

- Bug fix: Query startup should fail when -query.static-files has no trailing slash [#144](https://github.com/uber/jaeger/issues/144)
- Push to Docker Hub on release tags [#246](https://github.com/uber/jaeger/pull/246)


0.5.0 (2017-07-01)
------------------

First numbered release.
- Add basic authenticator to configs for cass
16 changes: 2 additions & 14 deletions cmd/agent/app/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,6 @@ func TestCreateCollectorProxy(t *testing.T) {
flags: []string{"--collector.host-port=foo"},
err: "at least one collector hostPort address is required when resolver is not available",
},
{
flags: []string{"--reporter.type=tchannel"},
metric: metricstest.ExpectedMetric{Name: "reporter.batches.failures", Tags: map[string]string{"protocol": "tchannel", "format": "jaeger"}, Value: 1},
},
{
flags: []string{"--reporter.type=tchannel", "--collector.host-port=foo"},
metric: metricstest.ExpectedMetric{Name: "reporter.batches.failures", Tags: map[string]string{"protocol": "tchannel", "format": "jaeger"}, Value: 1},
},
{
flags: []string{"--reporter.type=grpc", "--collector.host-port=foo"},
err: "at least one collector hostPort address is required when resolver is not available",
Expand Down Expand Up @@ -243,14 +235,12 @@ func TestCreateCollectorProxy(t *testing.T) {
require.NoError(t, err)

rOpts := new(reporter.Options).InitFromViper(v, zap.NewNop())
tchan := tchannel.NewBuilder().InitFromViper(v, zap.NewNop())
grpcBuilder := grpc.NewConnBuilder().InitFromViper(v)

metricsFactory := metricstest.NewFactory(time.Microsecond)

builders := map[reporter.Type]CollectorProxyBuilder{
reporter.GRPC: GRPCCollectorProxyBuilder(grpcBuilder),
tchannel.ReporterType: TCollectorProxyBuilder(tchan),
reporter.GRPC: GRPCCollectorProxyBuilder(grpcBuilder),
}
proxy, err := CreateCollectorProxy(ProxyBuilderOptions{
Options: *rOpts,
Expand All @@ -269,12 +259,10 @@ func TestCreateCollectorProxy(t *testing.T) {
}

func TestCreateCollectorProxy_UnknownReporter(t *testing.T) {
tchan := tchannel.NewBuilder()
grpcBuilder := grpc.NewConnBuilder()

builders := map[reporter.Type]CollectorProxyBuilder{
reporter.GRPC: GRPCCollectorProxyBuilder(grpcBuilder),
tchannel.ReporterType: TCollectorProxyBuilder(tchan),
reporter.GRPC: GRPCCollectorProxyBuilder(grpcBuilder),
}
proxy, err := CreateCollectorProxy(ProxyBuilderOptions{}, builders)
assert.Nil(t, proxy)
Expand Down
8 changes: 0 additions & 8 deletions cmd/agent/app/proxy_builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package app

import (
"github.com/jaegertracing/jaeger/cmd/agent/app/reporter/grpc"
"github.com/jaegertracing/jaeger/tchannel/agent/app/reporter/tchannel"
)

// GRPCCollectorProxyBuilder creates CollectorProxyBuilder for GRPC reporter
Expand All @@ -25,10 +24,3 @@ func GRPCCollectorProxyBuilder(builder *grpc.ConnBuilder) CollectorProxyBuilder
return grpc.NewCollectorProxy(builder, opts.AgentTags, opts.Metrics, opts.Logger)
}
}

// TCollectorProxyBuilder creates CollectorProxyBuilder for Tchannel reporter
func TCollectorProxyBuilder(builder *tchannel.Builder) CollectorProxyBuilder {
return func(opts ProxyBuilderOptions) (proxy CollectorProxy, err error) {
return tchannel.NewCollectorProxy(builder, opts.Metrics, opts.Logger)
}
}
6 changes: 1 addition & 5 deletions cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"github.com/jaegertracing/jaeger/pkg/config"
"github.com/jaegertracing/jaeger/pkg/version"
"github.com/jaegertracing/jaeger/ports"
"github.com/jaegertracing/jaeger/tchannel/agent/app/reporter/tchannel"
)

func main() {
Expand All @@ -55,11 +54,9 @@ func main() {
Namespace(metrics.NSOptions{Name: "agent"})

rOpts := new(reporter.Options).InitFromViper(v, logger)
tchanBuilder := tchannel.NewBuilder().InitFromViper(v, logger)
grpcBuilder := grpc.NewConnBuilder().InitFromViper(v)
builders := map[reporter.Type]app.CollectorProxyBuilder{
reporter.GRPC: app.GRPCCollectorProxyBuilder(grpcBuilder),
tchannel.ReporterType: app.TCollectorProxyBuilder(tchanBuilder),
reporter.GRPC: app.GRPCCollectorProxyBuilder(grpcBuilder),
}
cp, err := app.CreateCollectorProxy(app.ProxyBuilderOptions{
Options: *rOpts,
Expand Down Expand Up @@ -99,7 +96,6 @@ func main() {
svc.AddFlags,
app.AddFlags,
reporter.AddFlags,
tchannel.AddFlags,
grpc.AddFlags,
)

Expand Down
12 changes: 1 addition & 11 deletions cmd/all-in-one/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import (
"github.com/jaegertracing/jaeger/storage/dependencystore"
"github.com/jaegertracing/jaeger/storage/spanstore"
storageMetrics "github.com/jaegertracing/jaeger/storage/spanstore/metrics"
agentTchanRep "github.com/jaegertracing/jaeger/tchannel/agent/app/reporter/tchannel"
tCollector "github.com/jaegertracing/jaeger/tchannel/collector/app"
)

Expand Down Expand Up @@ -116,7 +115,6 @@ by default uses only in-memory database.`,

aOpts := new(agentApp.Builder).InitFromViper(v)
repOpts := new(agentRep.Options).InitFromViper(v, logger)
tchanBuilder := agentTchanRep.NewBuilder().InitFromViper(v, logger)
grpcBuilder := agentGrpcRep.NewConnBuilder().InitFromViper(v)
cOpts := new(collectorApp.CollectorOptions).InitFromViper(v)
qOpts := new(queryApp.QueryOptions).InitFromViper(v, logger)
Expand All @@ -131,18 +129,12 @@ by default uses only in-memory database.`,
HealthCheck: svc.HC(),
})
c.Start(cOpts)
tCollectorOpts := new(tCollector.Options).InitFromViper(v)
tc, err := tCollector.Start("jaeger-collector", tCollectorOpts, logger, c.SpanHandlers(), strategyStore)
if err != nil {
logger.Fatal("Could not start Tchannel thrift collector", zap.Error(err))
}

// agent
grpcBuilder.CollectorHostPorts = append(grpcBuilder.CollectorHostPorts, fmt.Sprintf("127.0.0.1:%d", cOpts.CollectorGRPCPort))
agentMetricsFactory := metricsFactory.Namespace(metrics.NSOptions{Name: "agent", Tags: nil})
builders := map[agentRep.Type]agentApp.CollectorProxyBuilder{
agentRep.GRPC: agentApp.GRPCCollectorProxyBuilder(grpcBuilder),
agentTchanRep.ReporterType: agentApp.TCollectorProxyBuilder(tchanBuilder),
agentRep.GRPC: agentApp.GRPCCollectorProxyBuilder(grpcBuilder),
}
cp, err := agentApp.CreateCollectorProxy(agentApp.ProxyBuilderOptions{
Options: *repOpts,
Expand All @@ -165,7 +157,6 @@ by default uses only in-memory database.`,
agent.Stop()
cp.Close()
c.Close()
tc.Close()
querySrv.Close()
if closer, ok := spanWriter.(io.Closer); ok {
err := closer.Close()
Expand All @@ -190,7 +181,6 @@ by default uses only in-memory database.`,
storageFactory.AddFlags,
agentApp.AddFlags,
agentRep.AddFlags,
agentTchanRep.AddFlags,
agentGrpcRep.AddFlags,
collectorApp.AddFlags,
tCollector.AddFlags,
Expand Down
10 changes: 0 additions & 10 deletions cmd/collector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import (
ss "github.com/jaegertracing/jaeger/plugin/sampling/strategystore"
"github.com/jaegertracing/jaeger/plugin/storage"
"github.com/jaegertracing/jaeger/ports"
tCollector "github.com/jaegertracing/jaeger/tchannel/collector/app"
)

const serviceName = "jaeger-collector"
Expand Down Expand Up @@ -94,11 +93,6 @@ func main() {
})
collectorOpts := new(app.CollectorOptions).InitFromViper(v)
c.Start(collectorOpts)
tCollectorOpts := new(tCollector.Options).InitFromViper(v)
tc, err := tCollector.Start("jaeger-collector", tCollectorOpts, logger, c.SpanHandlers(), strategyStore)
if err != nil {
logger.Fatal("Could not start Tchannel thrift collector", zap.Error(err))
}

svc.RunAndThen(func() {
if closer, ok := spanWriter.(io.Closer); ok {
Expand All @@ -111,9 +105,6 @@ func main() {
if err := c.Close(); err != nil {
logger.Error("failed to cleanly close the collector", zap.Error(err))
}
if err := tc.Close(); err != nil {
logger.Error("failed to cleanly close tchannel collector", zap.Error(err))
}
})
return nil
},
Expand All @@ -128,7 +119,6 @@ func main() {
command,
svc.AddFlags,
app.AddFlags,
tCollector.AddFlags,
storageFactory.AddFlags,
strategyStoreFactory.AddFlags,
)
Expand Down
1 change: 0 additions & 1 deletion crossdock/jaeger-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ services:
ports:
- "14269"
- "14268:14268"
- "14267"
- "14250"
- "9411:9411"
environment:
Expand Down
1 change: 0 additions & 1 deletion docker-compose/jaeger-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ services:
ports:
- "14269"
- "14268:14268"
- "14267"
- "14250"
- "9411:9411"
restart: on-failure
Expand Down

0 comments on commit a9cdc98

Please sign in to comment.