pub struct TelemetryEndpoint(/* private fields */);Expand description
The https URI the OTLP exporters send to, such as the Telemetry API’s global
https://telemetry.googleapis.com or a regional https://telemetry.REGION.rep.googleapis.com
(https://docs.cloud.google.com/stackdriver/docs/reference/telemetry/overview).
Plain http is refused, because every request carries the credentials’ access token.
use gcloud_observability::otlp::TelemetryEndpoint;
let regional: TelemetryEndpoint = "https://telemetry.europe-west1.rep.googleapis.com".parse()?;
assert!("http://telemetry.googleapis.com".parse::<TelemetryEndpoint>().is_err());Implementations§
Source§impl TelemetryEndpoint
impl TelemetryEndpoint
Sourcepub fn new(endpoint: impl Into<String>) -> GcloudObservabilityResult<Self>
pub fn new(endpoint: impl Into<String>) -> GcloudObservabilityResult<Self>
§Errors
GcloudObservabilityError::InvalidParametersError for the field endpoint when
endpoint is not a URI, or is not https, or has no host.
Trait Implementations§
Source§impl Clone for TelemetryEndpoint
impl Clone for TelemetryEndpoint
Source§impl Debug for TelemetryEndpoint
impl Debug for TelemetryEndpoint
Source§impl<'de> Deserialize<'de> for TelemetryEndpoint
impl<'de> Deserialize<'de> for TelemetryEndpoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for TelemetryEndpoint
impl Display for TelemetryEndpoint
impl Eq for TelemetryEndpoint
Source§impl FromStr for TelemetryEndpoint
impl FromStr for TelemetryEndpoint
Source§impl Hash for TelemetryEndpoint
impl Hash for TelemetryEndpoint
Source§impl PartialEq for TelemetryEndpoint
impl PartialEq for TelemetryEndpoint
Source§impl Serialize for TelemetryEndpoint
impl Serialize for TelemetryEndpoint
impl StructuralPartialEq for TelemetryEndpoint
Auto Trait Implementations§
impl Forget for TelemetryEndpoint
impl Freeze for TelemetryEndpoint
impl Move for TelemetryEndpoint
impl RefUnwindSafe for TelemetryEndpoint
impl Send for TelemetryEndpoint
impl Sync for TelemetryEndpoint
impl Unpin for TelemetryEndpoint
impl UnsafeUnpin for TelemetryEndpoint
impl UnwindSafe for TelemetryEndpoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request