Skip to content

Commit

Permalink
chore: some tweaks for demo (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhelx authored Nov 3, 2023
1 parent e0b93f0 commit 1689aab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions demo-iota/go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ func (s *server) runModule(res http.ResponseWriter, req *http.Request) {
httpClientIp := req.RemoteAddr
meta := datadog.DatadogMetadata{
ResourceName: &resourceName,
HttpMethod: &req.Method,
HttpUrl: &httpUrl,
HttpStatusCode: &httpStatusCode,
SpanKind: &spanKind,
Expand Down
8 changes: 6 additions & 2 deletions demo-iota/rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ use axum::{
Router,
};
use dylibso_observe_sdk::adapter::{
datadog::{AdapterMetadata, DatadogAdapter, DatadogConfig, DatadogMetadata, Options, SpanFilter},
datadog::{
AdapterMetadata, DatadogAdapter, DatadogConfig, DatadogMetadata, Options, SpanFilter,
},
AdapterHandle,
};
use serde::Deserialize;
Expand Down Expand Up @@ -70,7 +72,8 @@ async fn run_module(
let wasi = WasiCtxBuilder::new()
.stdin(Box::new(stdin.clone()))
.stdout(Box::new(stdout.clone()))
.arg(&query.name).unwrap()
.arg(&query.name)
.unwrap()
.build();

let mut store = wasmtime::Store::new(&engine, wasi);
Expand All @@ -93,6 +96,7 @@ async fn run_module(
f.call(&mut store, &[], &mut []).unwrap();

let meta = DatadogMetadata {
resource_name: Some("iota-rust".into()),
http_url: Some("https://iota.dylibso.com/run".into()),
http_method: Some("POST".into()),
http_status_code: Some(200u16),
Expand Down

0 comments on commit 1689aab

Please sign in to comment.