Skip to content

Commit

Permalink
Add tracing support (#1)
Browse files Browse the repository at this point in the history
Co-authored-by: Thor Anker Kvisgård Lange <[email protected]>
  • Loading branch information
KimNorgaard and langecode authored May 10, 2021
1 parent 43f737c commit 4570386
Show file tree
Hide file tree
Showing 17 changed files with 508 additions and 382 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ The application will listen for requests on three endpoints:
`/echo/`
a simple echo server sending any incomming input back to the requestor

`/entropy/`
a server emulating having multiple dependencies on other services

Besides this the application exposes the Go [pprof](https://golang.org/pkg/net/http/pprof/) allowing runtime profiling and more. This is served on the default path of `/debug/pprof`.


Expand Down Expand Up @@ -44,7 +47,7 @@ bazel run --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //cmd/jytte:d
Update Bazel dependencies generated from `go.mod`:

```bash
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=deps.bzl%go_dependencies -build_file_proto_mode=disable_global
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=deps.bzl%go_dependencies
```

Update the Bazel build files:
Expand Down
29 changes: 29 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

http_archive(
name = "io_bazel_rules_go",
Expand Down Expand Up @@ -47,6 +48,34 @@ container_pull(
digest = "sha256:59b46c319f3b66dfda96faafd0c6959e9b2f409792d0236204f270dfd0235960",
)

#
# Protobuf needed by OTEL
#

http_archive(
name = "rules_proto",
sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208",
strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
"https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
],
)

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()

git_repository(
name = "com_google_protobuf",
commit = "09745575a923640154bcf307fba8aedff47f240a",
remote = "https://github.com/protocolbuffers/protobuf",
shallow_since = "1558721209 -0700",
)

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
gazelle_dependencies()

Expand Down
Loading

0 comments on commit 4570386

Please sign in to comment.