Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracing: Deprecate Opencensus (@1.30) #29063

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions api/envoy/config/trace/v3/opencensus.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,35 @@ message OpenCensusConfig {
reserved 7;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@htuch you may know why - the one thing i didnt manage to do was deprecate the enum above (in file)

not sure why - probs i was just doing it wrong

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably only matters that you deprecate the fields that reference it.


// Configures tracing, e.g. the sampler, max number of annotations, etc.
opencensus.proto.trace.v1.TraceConfig trace_config = 1;
opencensus.proto.trace.v1.TraceConfig trace_config = 1
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// Enables the stdout exporter if set to true. This is intended for debugging
// purposes.
bool stdout_exporter_enabled = 2;
bool stdout_exporter_enabled = 2
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// Enables the Stackdriver exporter if set to true. The project_id must also
// be set.
bool stackdriver_exporter_enabled = 3;
bool stackdriver_exporter_enabled = 3
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// The Cloud project_id to use for Stackdriver tracing.
string stackdriver_project_id = 4;
string stackdriver_project_id = 4
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// (optional) By default, the Stackdriver exporter will connect to production
// Stackdriver. If stackdriver_address is non-empty, it will instead connect
// to this address, which is in the gRPC format:
// https://github.com/grpc/grpc/blob/master/doc/naming.md
string stackdriver_address = 10;
string stackdriver_address = 10
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// (optional) The gRPC server that hosts Stackdriver tracing service. Only
// Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
// is not provided, the default production Stackdriver address will be used.
core.v3.GrpcService stackdriver_grpc_service = 13;
core.v3.GrpcService stackdriver_grpc_service = 13
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// Enables the Zipkin exporter if set to true. The url and service name must
// also be set. This is deprecated, prefer to use Envoy's :ref:`native Zipkin
Expand All @@ -86,21 +92,26 @@ message OpenCensusConfig {

// Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
// ocagent_grpc_service must also be set.
bool ocagent_exporter_enabled = 11;
bool ocagent_exporter_enabled = 11
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
// format: https://github.com/grpc/grpc/blob/master/doc/naming.md
// [#comment:TODO: deprecate this field]
string ocagent_address = 12;
string ocagent_address = 12
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
// This is only used if the ocagent_address is left empty.
core.v3.GrpcService ocagent_grpc_service = 14;
core.v3.GrpcService ocagent_grpc_service = 14
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// List of incoming trace context headers we will accept. First one found
// wins.
repeated TraceContext incoming_trace_context = 8;
repeated TraceContext incoming_trace_context = 8
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// List of outgoing trace context headers we will produce.
repeated TraceContext outgoing_trace_context = 9;
repeated TraceContext outgoing_trace_context = 9
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];
}
3 changes: 3 additions & 0 deletions changelogs/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,6 @@ deprecated:
- area: tracing
change: |
OpenTracing is deprecated and will be removed at version 1.30, since the upstream project has been abandoned.
- area: tracing
change: |
Opencensus is deprecated and will be removed at version 1.30, since the upstream project has been abandoned.
2 changes: 1 addition & 1 deletion source/extensions/extensions_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ envoy.tracers.dynamic_ot:
envoy.tracers.opencensus:
categories:
- envoy.tracers
security_posture: robust_to_untrusted_downstream
security_posture: unknown
status: stable
type_urls:
- envoy.config.trace.v3.OpenCensusConfig
Expand Down
24 changes: 13 additions & 11 deletions test/extensions/tracers/opencensus/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Extensions {
namespace Tracers {
namespace OpenCensus {

TEST(OpenCensusTracerConfigTest, InvalidStackdriverConfiguration) {
TEST(OpenCensusTracerConfigTest, DEPRECATED_FEATURE_TEST(InvalidStackdriverConfiguration)) {
NiceMock<Server::Configuration::MockTracerFactoryContext> context;
OpenCensusTracerFactory factory;

Expand All @@ -41,7 +41,7 @@ TEST(OpenCensusTracerConfigTest, InvalidStackdriverConfiguration) {
"Opencensus stackdriver tracer only support GoogleGrpc.");
}

TEST(OpenCensusTracerConfigTest, InvalidOcagentConfiguration) {
TEST(OpenCensusTracerConfigTest, DEPRECATED_FEATURE_TEST(InvalidOcagentConfiguration)) {
NiceMock<Server::Configuration::MockTracerFactoryContext> context;
OpenCensusTracerFactory factory;

Expand All @@ -64,7 +64,7 @@ TEST(OpenCensusTracerConfigTest, InvalidOcagentConfiguration) {
"Opencensus ocagent tracer only supports GoogleGrpc.");
}

TEST(OpenCensusTracerConfigTest, OpenCensusHttpTracer) {
TEST(OpenCensusTracerConfigTest, DEPRECATED_FEATURE_TEST(OpenCensusHttpTracer)) {
NiceMock<Server::Configuration::MockTracerFactoryContext> context;
const std::string yaml_string = R"EOF(
http:
Expand All @@ -81,7 +81,7 @@ TEST(OpenCensusTracerConfigTest, OpenCensusHttpTracer) {
EXPECT_NE(nullptr, tracer);
}

TEST(OpenCensusTracerConfigTest, OpenCensusHttpTracerWithTypedConfig) {
TEST(OpenCensusTracerConfigTest, DEPRECATED_FEATURE_TEST(OpenCensusHttpTracerWithTypedConfig)) {
NiceMock<Server::Configuration::MockTracerFactoryContext> context;
const std::string yaml_string = R"EOF(
http:
Expand Down Expand Up @@ -155,7 +155,7 @@ TEST(OpenCensusTracerConfigTest,
{32, 32, 128, 32, ::opencensus::trace::ProbabilitySampler(1e-4)});
}

TEST(OpenCensusTracerConfigTest, OpenCensusHttpTracerGrpc) {
TEST(OpenCensusTracerConfigTest, DEPRECATED_FEATURE_TEST(OpenCensusHttpTracerGrpc)) {
NiceMock<Server::Configuration::MockTracerFactoryContext> context;
const std::string yaml_string = R"EOF(
http:
Expand Down Expand Up @@ -201,7 +201,7 @@ TEST(OpenCensusTracerConfigTest, OpenCensusHttpTracerGrpc) {
#endif
}

TEST(OpenCensusTracerConfigTest, ShouldCreateAtMostOneOpenCensusTracer) {
TEST(OpenCensusTracerConfigTest, DEPRECATED_FEATURE_TEST(ShouldCreateAtMostOneOpenCensusTracer)) {
NiceMock<Server::Configuration::MockTracerFactoryContext> context;
OpenCensusTracerFactory factory;

Expand Down Expand Up @@ -229,7 +229,8 @@ TEST(OpenCensusTracerConfigTest, ShouldCreateAtMostOneOpenCensusTracer) {
EXPECT_EQ(tracer_two, tracer_one);
}

TEST(OpenCensusTracerConfigTest, ShouldCacheFirstCreatedTracerUsingStrongReference) {
TEST(OpenCensusTracerConfigTest,
DEPRECATED_FEATURE_TEST(ShouldCacheFirstCreatedTracerUsingStrongReference)) {
NiceMock<Server::Configuration::MockTracerFactoryContext> context;
OpenCensusTracerFactory factory;

Expand All @@ -254,7 +255,7 @@ TEST(OpenCensusTracerConfigTest, ShouldCacheFirstCreatedTracerUsingStrongReferen
EXPECT_EQ(tracer_two, tracer_one.lock());
}

TEST(OpenCensusTracerConfigTest, ShouldNotCacheInvalidConfiguration) {
TEST(OpenCensusTracerConfigTest, DEPRECATED_FEATURE_TEST(ShouldNotCacheInvalidConfiguration)) {
NiceMock<Server::Configuration::MockTracerFactoryContext> context;
OpenCensusTracerFactory factory;

Expand Down Expand Up @@ -303,7 +304,8 @@ TEST(OpenCensusTracerConfigTest, ShouldNotCacheInvalidConfiguration) {
#endif
}

TEST(OpenCensusTracerConfigTest, ShouldRejectSubsequentCreateAttemptsWithDifferentConfig) {
TEST(OpenCensusTracerConfigTest,
DEPRECATED_FEATURE_TEST(ShouldRejectSubsequentCreateAttemptsWithDifferentConfig)) {
NiceMock<Server::Configuration::MockTracerFactoryContext> context;
OpenCensusTracerFactory factory;

Expand Down Expand Up @@ -343,7 +345,7 @@ TEST(OpenCensusTracerConfigTest, ShouldRejectSubsequentCreateAttemptsWithDiffere
"Opencensus has already been configured with a different config.");
}

TEST(OpenCensusTracerConfigTest, OpenCensusHttpTracerStackdriverGrpc) {
TEST(OpenCensusTracerConfigTest, DEPRECATED_FEATURE_TEST(OpenCensusHttpTracerStackdriverGrpc)) {
NiceMock<Server::Configuration::MockTracerFactoryContext> context;
const std::string yaml_string = R"EOF(
http:
Expand Down Expand Up @@ -376,7 +378,7 @@ TEST(OpenCensusTracerConfigTest, OpenCensusHttpTracerStackdriverGrpc) {
#endif
}

TEST(OpenCensusTracerConfigTest, OpenCensusHttpTracerStackdriverAddress) {
TEST(OpenCensusTracerConfigTest, DEPRECATED_FEATURE_TEST(OpenCensusHttpTracerStackdriverAddress)) {
NiceMock<Server::Configuration::MockTracerFactoryContext> context;
const std::string yaml_string = R"EOF(
http:
Expand Down
Loading