-
Notifications
You must be signed in to change notification settings - Fork 446
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
Mock for http exporters #1185
Mock for http exporters #1185
Changes from 43 commits
8884077
843b2c2
fcd0816
f914d64
aeb88ab
67f969a
1da7779
a4256db
230add4
8f4e600
3ef1582
a47f576
adcc7d3
8f06a91
2bf1bd8
5c7ec0a
c6c6b4b
296de51
c00a3fd
f5e84e7
f9d6d5b
03777d5
a67edc1
aaa04f2
19ec997
79a1709
62cc1dd
4e3b68d
79341af
ceac43a
fe5dd6f
f724e1a
f500f4d
75427be
1101015
7033b30
7f3773a
486fa33
cbd5d10
7b18c4c
525bcc4
52650a6
9d82629
d9b7291
6fd0201
a643d1a
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 |
---|---|---|
|
@@ -98,7 +98,15 @@ class OtlpHttpExporter final : public opentelemetry::sdk::trace::SpanExporter | |
const OtlpHttpExporterOptions options_; | ||
|
||
// Object that stores the HTTP sessions that have been created | ||
OtlpHttpClient http_client_; | ||
std::unique_ptr<OtlpHttpClient> http_client_; | ||
// For testing | ||
friend class OtlpHttpExporterTestPeer; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicated with line 95? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks, cleaned. |
||
/** | ||
* Create an OtlpHttpExporter using the specified http client. | ||
* Only tests can call this constructor directly. | ||
* @param http_client the http client to be used for exporting | ||
*/ | ||
OtlpHttpExporter(std::unique_ptr<OtlpHttpClient> http_client); | ||
}; | ||
} // namespace otlp | ||
} // namespace exporter | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,15 @@ class OtlpHttpLogExporter final : public opentelemetry::sdk::logs::LogExporter | |
const OtlpHttpLogExporterOptions options_; | ||
|
||
// Object that stores the HTTP sessions that have been created | ||
OtlpHttpClient http_client_; | ||
std::unique_ptr<OtlpHttpClient> http_client_; | ||
// For testing | ||
friend class OtlpHttpLogExporterTestPeer; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicated with line 94. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks, cleaned |
||
/** | ||
* Create an OtlpHttpLogExporter using the specified http client. | ||
* Only tests can call this constructor directly. | ||
* @param http_client the http client to be used for exporting | ||
*/ | ||
OtlpHttpLogExporter(std::unique_ptr<OtlpHttpClient> http_client); | ||
}; | ||
} // namespace otlp | ||
} // namespace exporter | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit -
--copt=-DENABLE_TEST
is also part ofBAZEL_OPTIONS
, so can be removed here.