async_profiler_agent/reporter/
mod.rs

1// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2// SPDX-License-Identifier: Apache-2.0
3
4use std::fmt;
5
6use async_trait::async_trait;
7
8use crate::metadata::ReportMetadata;
9
10pub mod local;
11pub mod multi;
12#[cfg(feature = "s3")]
13pub mod s3;
14
15/// Abstraction around reporting profiler data.
16#[async_trait]
17pub trait Reporter: fmt::Debug {
18    async fn report(
19        &self,
20        jfr: Vec<u8>,
21        metadata: &ReportMetadata,
22    ) -> Result<(), Box<dyn std::error::Error + Send>>;
23}