pub fn get_lambda_resource() -> ResourceExpand description
Retrieves the Lambda resource information for OpenTelemetry.
This function creates a Resource object that includes Lambda-specific
information. It attempts to set the service name from environment variables,
prioritizing OTEL_SERVICE_NAME over AWS_LAMBDA_FUNCTION_NAME.
§Returns
Returns a Resource object containing Lambda-specific information and the service name.
§Examples
use otlp_stdout_client::get_lambda_resource;
use opentelemetry_sdk::resource::Resource;
let lambda_resource = get_lambda_resource();
// Use lambda_resource in your OpenTelemetry configuration