Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Commit

Permalink
feat: with opentelemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
kjuulh committed Apr 30, 2023
1 parent bb74617 commit 07d1445
Show file tree
Hide file tree
Showing 29 changed files with 30,244 additions and 11 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.93"
tokio = { version = "1.25.0", features = ["full"] }
tracing = { version = "0.1.37", features = ["log", "std"] }

tracing-subscriber = { version = "0.3.17", features = [
"tracing-log",
"tracing",
Expand All @@ -29,5 +30,6 @@ tracing-opentelemetry = { version = "0.18.0" }
opentelemetry = { version = "0.18.0", default-features = false, features = [
"trace",
] }
thiserror = "1.0.40"
opentelemetry-jaeger = "0.17.0"

thiserror = "1.0.40"
1 change: 1 addition & 0 deletions crates/dagger-codegen/src/rust/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pub fn format_function(funcs: &CommonFunctions, field: &FullTypeFields) -> Optio
});

let signature = quote! {
#[tracing::instrument(skip_all)]
pub $(is_async) fn $(field.name.pipe(|n | format_struct_name(n)))
};

Expand Down
2 changes: 1 addition & 1 deletion crates/dagger-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ genco = "0.17.3"
tracing-test = "0.2.4"

[features]
default = ["otel"]
default = []
otel = [
"dep:tracing-opentelemetry",
"dep:opentelemetry",
Expand Down
25 changes: 25 additions & 0 deletions crates/dagger-sdk/examples/tracing/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

build-*
17 changes: 17 additions & 0 deletions crates/dagger-sdk/examples/tracing/app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# React Build

This is based on the [Getting Started guide for Nodejs](https://docs.dagger.io/sdk/nodejs/783645/get-started#step-5-test-against-multiple-nodejs-versions)

A simple react app is created with `create-react-app` which is built and tested by `build.js` or `build.ts`.

Run:

`npm install`

and then:

`node --loader ts-node/esm ./build.ts`

or

`node ./build.js`
Loading

0 comments on commit 07d1445

Please sign in to comment.