Skip to content

Commit bd7464e

Browse files
committed
fix formatting
Signed-off-by: Simon Davies <[email protected]>
1 parent 4a3f047 commit bd7464e

File tree

1 file changed

+9
-8
lines changed
  • src/hyperlight_host/examples/otlp_tracing

1 file changed

+9
-8
lines changed

src/hyperlight_host/examples/otlp_tracing/main.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ use hyperlight_host::sandbox_state::sandbox::EvolvableSandbox;
3333
use hyperlight_host::sandbox_state::transition::Noop;
3434
use hyperlight_host::{GuestBinary, MultiUseSandbox, Result as HyperlightResult};
3535
use hyperlight_testing::simple_guest_as_string;
36-
use opentelemetry::global;
3736
use opentelemetry::trace::TracerProvider;
38-
use opentelemetry::KeyValue;
37+
use opentelemetry::{global, KeyValue};
3938
use opentelemetry_otlp::{SpanExporter, WithExportConfig};
4039
//use opentelemetry_sdk::runtime::Tokio;
4140
use opentelemetry_sdk::Resource;
@@ -60,21 +59,23 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
6059
provider.shutdown()?;
6160

6261
Ok(())
63-
6462
}
6563

66-
fn init_tracing_subscriber(addr: &str) -> Result<SdkTracerProvider, Box<dyn Error + Send + Sync + 'static>> {
64+
fn init_tracing_subscriber(
65+
addr: &str,
66+
) -> Result<SdkTracerProvider, Box<dyn Error + Send + Sync + 'static>> {
6767
let exporter = SpanExporter::builder()
6868
.with_tonic()
6969
.with_endpoint(addr)
7070
.build()?;
7171

7272
let version = KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION"));
73-
let resource = Resource::builder().with_service_name( "hyperlight_otel_example").with_attribute(
74-
version
75-
).build();
73+
let resource = Resource::builder()
74+
.with_service_name("hyperlight_otel_example")
75+
.with_attribute(version)
76+
.build();
7677

77-
let provider = opentelemetry_sdk::trace::SdkTracerProvider::builder()
78+
let provider = opentelemetry_sdk::trace::SdkTracerProvider::builder()
7879
.with_resource(resource)
7980
.with_batch_exporter(exporter)
8081
.build();

0 commit comments

Comments
 (0)