Skip to content

Commit 97988e0

Browse files
authored
feat: remove ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY from generator (#15835)
1 parent 76d84d7 commit 97988e0

File tree

1,708 files changed

+0
-9276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,708 files changed

+0
-9276
lines changed

generator/integration_tests/golden/v1/internal/deprecated_tracing_connection.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ namespace cloud {
2626
namespace golden_v1_internal {
2727
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2828

29-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
30-
3129
DeprecatedServiceTracingConnection::DeprecatedServiceTracingConnection(
3230
std::shared_ptr<golden_v1::DeprecatedServiceConnection> child)
3331
: child_(std::move(child)) {}
@@ -39,16 +37,12 @@ DeprecatedServiceTracingConnection::Noop(google::test::deprecated::v1::Deprecate
3937
return internal::EndSpan(*span, child_->Noop(request));
4038
}
4139

42-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
43-
4440
std::shared_ptr<golden_v1::DeprecatedServiceConnection>
4541
MakeDeprecatedServiceTracingConnection(
4642
std::shared_ptr<golden_v1::DeprecatedServiceConnection> conn) {
47-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
4843
if (internal::TracingEnabled(conn->options())) {
4944
conn = std::make_shared<DeprecatedServiceTracingConnection>(std::move(conn));
5045
}
51-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
5246
return conn;
5347
}
5448

generator/integration_tests/golden/v1/internal/deprecated_tracing_connection.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ namespace cloud {
2828
namespace golden_v1_internal {
2929
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
3030

31-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
32-
3331
class DeprecatedServiceTracingConnection
3432
: public golden_v1::DeprecatedServiceConnection {
3533
public:
@@ -47,8 +45,6 @@ class DeprecatedServiceTracingConnection
4745
std::shared_ptr<golden_v1::DeprecatedServiceConnection> child_;
4846
};
4947

50-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
51-
5248
/**
5349
* Conditionally applies the tracing decorator to the given connection.
5450
*

generator/integration_tests/golden/v1/internal/deprecated_tracing_stub.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ namespace cloud {
2626
namespace golden_v1_internal {
2727
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2828

29-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
30-
3129
DeprecatedServiceTracingStub::DeprecatedServiceTracingStub(
3230
std::shared_ptr<DeprecatedServiceStub> child)
3331
: child_(std::move(child)), propagator_(internal::MakePropagator()) {}
@@ -43,15 +41,9 @@ Status DeprecatedServiceTracingStub::Noop(
4341
child_->Noop(context, options, request));
4442
}
4543

46-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
47-
4844
std::shared_ptr<DeprecatedServiceStub> MakeDeprecatedServiceTracingStub(
4945
std::shared_ptr<DeprecatedServiceStub> stub) {
50-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
5146
return std::make_shared<DeprecatedServiceTracingStub>(std::move(stub));
52-
#else
53-
return stub;
54-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
5547
}
5648

5749
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END

generator/integration_tests/golden/v1/internal/deprecated_tracing_stub.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ namespace cloud {
3030
namespace golden_v1_internal {
3131
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
3232

33-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
34-
3533
class DeprecatedServiceTracingStub : public DeprecatedServiceStub {
3634
public:
3735
~DeprecatedServiceTracingStub() override = default;
@@ -48,8 +46,6 @@ class DeprecatedServiceTracingStub : public DeprecatedServiceStub {
4846
std::shared_ptr<opentelemetry::context::propagation::TextMapPropagator> propagator_;
4947
};
5048

51-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
52-
5349
/**
5450
* Applies the tracing decorator to the given stub.
5551
*

generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_connection.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ namespace cloud {
2727
namespace golden_v1_internal {
2828
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2929

30-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
31-
3230
GoldenKitchenSinkTracingConnection::GoldenKitchenSinkTracingConnection(
3331
std::shared_ptr<golden_v1::GoldenKitchenSinkConnection> child)
3432
: child_(std::move(child)) {}
@@ -136,16 +134,12 @@ GoldenKitchenSinkTracingConnection::ListOperations(google::longrunning::ListOper
136134
std::move(span), std::move(sr));
137135
}
138136

139-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
140-
141137
std::shared_ptr<golden_v1::GoldenKitchenSinkConnection>
142138
MakeGoldenKitchenSinkTracingConnection(
143139
std::shared_ptr<golden_v1::GoldenKitchenSinkConnection> conn) {
144-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
145140
if (internal::TracingEnabled(conn->options())) {
146141
conn = std::make_shared<GoldenKitchenSinkTracingConnection>(std::move(conn));
147142
}
148-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
149143
return conn;
150144
}
151145

generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_connection.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ namespace cloud {
2828
namespace golden_v1_internal {
2929
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
3030

31-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
32-
3331
class GoldenKitchenSinkTracingConnection
3432
: public golden_v1::GoldenKitchenSinkConnection {
3533
public:
@@ -88,8 +86,6 @@ class GoldenKitchenSinkTracingConnection
8886
std::shared_ptr<golden_v1::GoldenKitchenSinkConnection> child_;
8987
};
9088

91-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
92-
9389
/**
9490
* Conditionally applies the tracing decorator to the given connection.
9591
*

generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_stub.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ namespace cloud {
3131
namespace golden_v1_internal {
3232
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
3333

34-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
35-
3634
GoldenKitchenSinkTracingStub::GoldenKitchenSinkTracingStub(
3735
std::shared_ptr<GoldenKitchenSinkStub> child)
3836
: child_(std::move(child)), propagator_(internal::MakePropagator()) {}
@@ -242,15 +240,9 @@ GoldenKitchenSinkTracingStub::AsyncStreamingWrite(
242240
std::move(context), std::move(stream), std::move(span));
243241
}
244242

245-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
246-
247243
std::shared_ptr<GoldenKitchenSinkStub> MakeGoldenKitchenSinkTracingStub(
248244
std::shared_ptr<GoldenKitchenSinkStub> stub) {
249-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
250245
return std::make_shared<GoldenKitchenSinkTracingStub>(std::move(stub));
251-
#else
252-
return stub;
253-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
254246
}
255247

256248
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END

generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_stub.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ namespace cloud {
3030
namespace golden_v1_internal {
3131
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
3232

33-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
34-
3533
class GoldenKitchenSinkTracingStub : public GoldenKitchenSinkStub {
3634
public:
3735
~GoldenKitchenSinkTracingStub() override = default;
@@ -139,8 +137,6 @@ class GoldenKitchenSinkTracingStub : public GoldenKitchenSinkStub {
139137
std::shared_ptr<opentelemetry::context::propagation::TextMapPropagator> propagator_;
140138
};
141139

142-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
143-
144140
/**
145141
* Applies the tracing decorator to the given stub.
146142
*

generator/integration_tests/golden/v1/internal/golden_rest_only_tracing_connection.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ namespace cloud {
2626
namespace golden_v1_internal {
2727
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2828

29-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
30-
3129
GoldenRestOnlyTracingConnection::GoldenRestOnlyTracingConnection(
3230
std::shared_ptr<golden_v1::GoldenRestOnlyConnection> child)
3331
: child_(std::move(child)) {}
@@ -39,16 +37,12 @@ GoldenRestOnlyTracingConnection::Noop(google::protobuf::Empty const& request) {
3937
return internal::EndSpan(*span, child_->Noop(request));
4038
}
4139

42-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
43-
4440
std::shared_ptr<golden_v1::GoldenRestOnlyConnection>
4541
MakeGoldenRestOnlyTracingConnection(
4642
std::shared_ptr<golden_v1::GoldenRestOnlyConnection> conn) {
47-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
4843
if (internal::TracingEnabled(conn->options())) {
4944
conn = std::make_shared<GoldenRestOnlyTracingConnection>(std::move(conn));
5045
}
51-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
5246
return conn;
5347
}
5448

generator/integration_tests/golden/v1/internal/golden_rest_only_tracing_connection.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ namespace cloud {
2828
namespace golden_v1_internal {
2929
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
3030

31-
#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
32-
3331
class GoldenRestOnlyTracingConnection
3432
: public golden_v1::GoldenRestOnlyConnection {
3533
public:
@@ -47,8 +45,6 @@ class GoldenRestOnlyTracingConnection
4745
std::shared_ptr<golden_v1::GoldenRestOnlyConnection> child_;
4846
};
4947

50-
#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
51-
5248
/**
5349
* Conditionally applies the tracing decorator to the given connection.
5450
*

0 commit comments

Comments
 (0)