-
Notifications
You must be signed in to change notification settings - Fork 500
[EXPORTER] Allow to share gRPC clients between OTLP exporters #3041
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
Changes from 28 commits
213e3cf
5c5f9b7
37e5081
c9cb2df
0d409d4
cd80d19
ad722f4
f4521f3
38860d3
b5daf3f
8e9d300
51e0964
40ca747
b2aa191
3547800
ef62bc0
caa1743
949c679
e1e6627
74ceb64
d5bb715
c9419bf
d4b0286
72e4cb3
edd0c16
3ff6e4b
829294e
94260b3
4367e62
e2b23aa
5142036
d7266aa
603e2fa
adcf88e
b71c655
1145003
4d4d3a5
fe30625
7b2f29e
62756bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ if(WITH_NO_DEPRECATED_CODE) | |
INTERFACE OPENTELEMETRY_NO_DEPRECATED_CODE) | ||
endif() | ||
|
||
if(WITH_ABSEIL) | ||
if(WITH_ABSEIL OR WITH_OTLP_GRPC) | ||
|
||
target_compile_definitions(opentelemetry_api INTERFACE HAVE_ABSEIL) | ||
target_link_libraries( | ||
opentelemetry_api INTERFACE absl::bad_variant_access absl::any absl::base | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include <memory> | ||
|
||
#include "opentelemetry/exporters/otlp/otlp_grpc_client_options.h" | ||
#include "opentelemetry/nostd/shared_ptr.h" | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace exporter | ||
{ | ||
namespace otlp | ||
{ | ||
|
||
class OtlpGrpcClientReferenceGuard; | ||
class OtlpGrpcClient; | ||
|
||
/** | ||
* Factory class for OtlpGrpcClient. | ||
*/ | ||
class OPENTELEMETRY_EXPORT OtlpGrpcClientFactory | ||
{ | ||
public: | ||
/** | ||
* Create an OtlpGrpcClient using all default options. | ||
*/ | ||
static nostd::shared_ptr<OtlpGrpcClient> Create(const OtlpGrpcClientOptions &options); | ||
|
||
static nostd::shared_ptr<OtlpGrpcClientReferenceGuard> CreateReferenceGuard(); | ||
}; | ||
|
||
} // namespace otlp | ||
} // namespace exporter | ||
OPENTELEMETRY_END_NAMESPACE |
Uh oh!
There was an error while loading. Please reload this page.