MCPcopy Index your code
hub / github.com/aws/aws-lambda-rust-runtime / with_telemetry_processor

Method with_telemetry_processor

lambda-extension/src/extension.rs:192–212  ·  view source on GitHub ↗

Create a new [`Extension`] with a service that receives Lambda telemetry data. By default, telemetry log records are deserialized as `String`, but it's possible to configure Lambda functions to emit logs in JSON format. For more information, refer to [`Self::with_telemetry_record_type`].

(self, lp: N)

Source from the content-addressed store, hash-verified

190 /// it's possible to configure Lambda functions to emit logs in JSON format.
191 /// For more information, refer to [`Self::with_telemetry_record_type`].
192 pub fn with_telemetry_processor<N, NS>(self, lp: N) -> Extension<'a, E, L, N, TL>
193 where
194 N: Service<()>,
195 N::Future: Future<Output = Result<NS, N::Error>>,
196 N::Error: Into<Error> + fmt::Display,
197 {
198 Extension {
199 telemetry_processor: Some(lp),
200 events_processor: self.events_processor,
201 extension_name: self.extension_name,
202 events: self.events,
203 log_types: self.log_types,
204 log_buffering: self.log_buffering,
205 logs_processor: self.logs_processor,
206 log_port_number: self.log_port_number,
207 telemetry_types: self.telemetry_types,
208 telemetry_buffering: self.telemetry_buffering,
209 telemetry_port_number: self.telemetry_port_number,
210 _telemetry_record_type: self._telemetry_record_type,
211 }
212 }
213
214 /// Create a new [`Extension`] with a list of telemetry types to subscribe.
215 /// The only accepted telemetry types are `function`, `platform`, and `extension`.

Callers 2

mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected