forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into cpp20
Change-Id: Id663fb0a88a9eb2968a86539054f7ef87aa518e6
- Loading branch information
Showing
115 changed files
with
3,203 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
api/envoy/extensions/tracers/opentelemetry/samplers/v3/dynatrace_sampler.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
syntax = "proto3"; | ||
|
||
package envoy.extensions.tracers.opentelemetry.samplers.v3; | ||
|
||
import "envoy/config/core/v3/http_uri.proto"; | ||
|
||
import "udpa/annotations/status.proto"; | ||
|
||
option java_package = "io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3"; | ||
option java_outer_classname = "DynatraceSamplerProto"; | ||
option java_multiple_files = true; | ||
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/tracers/opentelemetry/samplers/v3;samplersv3"; | ||
option (udpa.annotations.file_status).package_version_status = ACTIVE; | ||
|
||
// [#protodoc-title: Dynatrace Sampler config] | ||
// Configuration for the Dynatrace Sampler extension. | ||
// [#extension: envoy.tracers.opentelemetry.samplers.dynatrace] | ||
|
||
// [#next-free-field: 6] | ||
message DynatraceSamplerConfig { | ||
// The Dynatrace tenant. | ||
// | ||
// The value can be obtained from the Envoy deployment page in Dynatrace. | ||
string tenant = 1; | ||
|
||
// The id of the Dynatrace cluster id. | ||
// | ||
// The value can be obtained from the Envoy deployment page in Dynatrace. | ||
int32 cluster_id = 2; | ||
|
||
// The HTTP URI to fetch the sampler configuration (root spans per minute). For example: | ||
// | ||
// .. code-block:: yaml | ||
// | ||
// http_uri: | ||
// uri: <tenant>.dev.dynatracelabs.com/api/v2/otlp/v1/traces | ||
// cluster: dynatrace | ||
// timeout: 10s | ||
// | ||
config.core.v3.HttpUri http_uri = 3; | ||
|
||
// The access token to fetch the sampling configuration from the Dynatrace API | ||
string token = 4; | ||
|
||
// Default number of root spans per minute, used when the value can't be obtained from the Dynatrace API. | ||
// | ||
// A default value of ``1000`` is used when: | ||
// | ||
// - ``root_spans_per_minute`` is unset | ||
// - ``root_spans_per_minute`` is set to 0 | ||
// | ||
uint32 root_spans_per_minute = 5; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# TODO: Remove once https://github.com/open-telemetry/opentelemetry-cpp/issues/2556 is merged | ||
|
||
--- a/api/include/opentelemetry/trace/span_context.h | ||
+++ b/api/include/opentelemetry/trace/span_context.h | ||
@@ -30,7 +30,7 @@ class SpanContext final | ||
SpanContext(bool sampled_flag, bool is_remote) noexcept | ||
: trace_id_(), | ||
span_id_(), | ||
- trace_flags_(trace::TraceFlags((uint8_t)sampled_flag)), | ||
+ trace_flags_(trace::TraceFlags(static_cast<uint8_t>(sampled_flag))), | ||
is_remote_(is_remote), | ||
trace_state_(TraceState::GetDefault()) | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#pragma once | ||
|
||
#include "envoy/network/address.h" | ||
|
||
#include "absl/functional/any_invocable.h" | ||
|
||
namespace Envoy { | ||
namespace Network { | ||
|
||
/** | ||
* An interface through which a UDP listen socket, especially a QUIC socket, can | ||
* postpone reading during hot restart until the parent instance is drained. | ||
*/ | ||
class ParentDrainedCallbackRegistrar { | ||
public: | ||
/** | ||
* @param address is the address of the listener. | ||
* @param callback the function to call when the listener matching address is | ||
* drained on the parent instance. | ||
*/ | ||
virtual void registerParentDrainedCallback(const Address::InstanceConstSharedPtr& address, | ||
absl::AnyInvocable<void()> callback) PURE; | ||
|
||
protected: | ||
virtual ~ParentDrainedCallbackRegistrar() = default; | ||
}; | ||
|
||
} // namespace Network | ||
} // namespace Envoy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "source/common/config/stats_utility.h" | ||
|
||
#include "source/common/stats/histogram_impl.h" | ||
#include "source/common/stats/stats_matcher_impl.h" | ||
#include "source/common/stats/tag_producer_impl.h" | ||
|
||
namespace Envoy { | ||
namespace Config { | ||
|
||
Stats::TagProducerPtr | ||
StatsUtility::createTagProducer(const envoy::config::bootstrap::v3::Bootstrap& bootstrap, | ||
const Stats::TagVector& cli_tags) { | ||
return std::make_unique<Stats::TagProducerImpl>(bootstrap.stats_config(), cli_tags); | ||
} | ||
|
||
} // namespace Config | ||
} // namespace Envoy |
Oops, something went wrong.