Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 33 additions & 30 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/debian
{
"name": "Debian",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Debian version: bullseye, buster, stretch
// Use bullseye or stretch on local arm64/Apple Silicon.
"args": { "VARIANT": "bullseye" }
},
"name": "Debian",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Debian version: bullseye, buster, stretch
// Use bullseye or stretch on local arm64/Apple Silicon.
"args": { "VARIANT": "bullseye" }
},

// Set *default* container specific settings.json values on container create.
"settings": {},
// Set *default* container specific settings.json values on container create.
// "settings": {},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"amirha.elps"
],
// Add the IDs of extensions you want installed when the container is created.
// "extensions": [
// "amirha.elps"
// ],
"customizations": {
"vscode": {
"extensions": ["amirha.elps", "GitHub.copilot"],
"settings": {}
}
},

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"remoteEnv": { "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" },
"features": {
"docker-from-docker": {
"version": "latest",
"moby": true
},
"golang": "latest"
}
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"remoteEnv": { "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" },
"features": {
"docker-from-docker": {
"version": "latest",
"moby": true
},
"golang": "latest"
}

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],

// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
}
4 changes: 2 additions & 2 deletions .github/workflows/sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22.x"
go-version: "1.23"
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.59
version: v1.63
- name: Run CI tests
run: script -q -e -c "make citest"
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: "2"
run:
timeout: 2m
linters:
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,17 @@ explorer-clean:
.PHONY: explorer-watch
explorer-watch:
cd ${PROJECT_REL_DIR}/explorer && make watch

.PHONY: observability-up observability-down


.PHONY: observability-network observability-up observability-down

observability-network:
docker network inspect byfn >/dev/null 2>&1 || docker network create byfn

observability-up: observability-network
docker compose -f compose/tempo.yaml -f compose/grafana.yaml up -d --build

observability-down:
docker compose -f compose/tempo.yaml -f compose/grafana.yaml down --volumes --remove-orphans
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,30 @@ environment variable to point at an OTLP endpoint (e.g. a Grafana agent). When
configured, trace spans will be created at key layers of the stack and delivered
to the configured endpoint.

You can test tracing locally by setting the following env variables:

```bash
SANDBOX_ORACLE_OTLP_ENDPOINT=http://otlp-hostname:4317
SHIROCLIENT_GATEWAY_OTLP_TRACER_ENDPOINT=http://otlp-hostname:4317
CHAINCODE_OTLP_TRACER_ENDPOINT=http://otlp-hostname:4317
export SANDBOX_ORACLE_OTLP_ENDPOINT=http://tempo:4317
export SHIROCLIENT_GATEWAY_OTLP_TRACER_ENDPOINT=http://tempo:4317
export CHAINCODE_OTLP_TRACER_ENDPOINT=http://tempo:4317
```

And bringing up observability:

```
make observability-up
```

Login to the local [grafana](http://localhost:3000/) with username: admin,
password: admin.

Click "Explore" and select "Tempo" as the data source. Query `{}` to list
all traces.

#### ELPS trace spans

Phylum endpoints defined with `defendpoint` will automatically receive a span
named after the endpoint. Other functions in the phylum can be traced by adding
named after the endpoint. Other functions in the phylum can be traced by adding
a special ELPS doc keyword:

```lisp
Expand Down
2 changes: 1 addition & 1 deletion api/buf.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: v2
lint:
use:
- DEFAULT
- STANDARD
deps:
- buf.build/googleapis/googleapis
- buf.build/grpc-ecosystem/grpc-gateway
Expand Down
Loading
Loading