Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
952a94b
feat(otel): Add OpenTelemetry distributed tracing and ctutils logging…
himaschal Dec 8, 2025
518b1d8
Update ctutils to v0.1.7
himaschal Dec 10, 2025
c64d10e
ci: add workflow to update ctutils dependencies
himaschal Dec 12, 2025
86dc36a
fix(ci): use oauth2 syntax for authentication and debug token
himaschal Dec 12, 2025
fea9c9d
fix(ci): use GITHUB_TOKEN for PR creation
himaschal Dec 12, 2025
c370095
fix(ci): auth to private ctutils for lint and vuln checks
himaschal Dec 12, 2025
0991a95
fix(ci): auth to private ctutils for database integration tests
himaschal Dec 12, 2025
03dc543
fix(ci): auth to private ctutils and set GOPRIVATE for CodeQL
himaschal Dec 12, 2025
13a414e
test: clean run trigger for v0.1.11-test
himaschal Dec 17, 2025
c71aacb
chore(deps): update ctutils to latest version
himaschal Dec 17, 2025
6ae67f5
Merge pull request #4 from digicert/chore/update-ctutils
himaschal Dec 17, 2025
febb1a9
chore: test pipeline run with ctutils v0.1.12-test
himaschal Dec 17, 2025
683f18f
chore(deps): update ctutils to latest version
himaschal Dec 17, 2025
f04e183
Merge pull request #5 from digicert/chore/update-ctutils
himaschal Dec 17, 2025
66422c4
chore: test pipeline run with ctutils v0.1.13-test
himaschal Dec 18, 2025
53ae555
chore(deps): update ctutils to latest version
himaschal Dec 18, 2025
c2fab3b
Merge pull request #6 from digicert/chore/update-ctutils
himaschal Dec 18, 2025
d81bf44
chore: revert pipeline testing configurations to production ready state
himaschal Dec 23, 2025
996c9dc
RA-8279: Modified to use github app
himaschal Jan 14, 2026
ac7a3ca
ci: use github app for private repo access
himaschal Jan 15, 2026
8448274
ci: update all workflows to use github app token
himaschal Jan 15, 2026
4300dd0
chore(deps): update ctutils to latest version
himaschal Jan 15, 2026
80f9e8f
Merge pull request #8 from digicert/chore/update-ctutils-test
himaschal Jan 15, 2026
221044d
chore(deps): update ctutils to latest version
himaschal Jan 15, 2026
ef8cfbb
Merge pull request #9 from digicert/chore/update-ctutils-test
himaschal Jan 15, 2026
c16b7e8
chore(deps): update ctutils to latest version
himaschal Jan 15, 2026
6704de0
Merge pull request #10 from digicert/chore/update-ctutils-test
himaschal Jan 15, 2026
81f2939
fix(ci): remove hardcoded base branch reference
himaschal Jan 16, 2026
07177d7
chore: update ctutils to v0.1.18-test
himaschal Jan 16, 2026
d64493d
Revert "chore: update ctutils to v0.1.18-test"
himaschal Jan 16, 2026
370d288
chore: update ctutils to v0.1.19-test
himaschal Jan 16, 2026
ef8b47c
Merge pull request #12 from digicert/clean-run-6.0-update
himaschal Jan 16, 2026
c386558
Address Trillian PR comments in serverutil
himaschal Jan 17, 2026
318ff24
Document InitLogging fail-safe behavior
himaschal Jan 17, 2026
0c53a44
Document InitLogging behavior in log_signer
himaschal Jan 17, 2026
74e42c3
Support LOG_LEVEL env var in config
himaschal Jan 17, 2026
c9543cf
Add unit tests for InitLogging
himaschal Jan 17, 2026
6050b10
Remove obsolete Dockerfile.unified
himaschal Jan 17, 2026
cb3ffff
Clean up duplicate comments in Dockerfiles
himaschal Jan 17, 2026
586f41b
Remove misleading comment in go.mod
himaschal Jan 17, 2026
deb3c87
Fix lint errors in config_test.go
himaschal Jan 18, 2026
0e27de6
Add shutdown handling and config consistency
himaschal Jan 22, 2026
ff55056
add Dockerfile.local to .gitignore. Used for local dev / builds.
himaschal Jan 22, 2026
2c11080
build: update ctutils dependency to fix CI build
himaschal Jan 23, 2026
fef833f
RA-8279: Update README with minor changes.
himaschal Jan 26, 2026
ba2ccae
RA-8279: Address PR comments. Add `GOPRIVATE` and `GONOSUMDB` environ…
himaschal Jan 26, 2026
beb4e3f
fix(ci): robust latest release resolution for ctutils
himaschal Jan 26, 2026
800d4ea
fix(ci): add GONOPROXY for private ctutils module access
himaschal Jan 26, 2026
4236c87
test: remove GONOPROXY to verify if it's necessary
himaschal Jan 26, 2026
abf3be0
Revert "test: remove GONOPROXY to verify if it's necessary"
himaschal Jan 26, 2026
646baff
test: remove GONOPROXY again to check if fixed tag resolves issue
himaschal Jan 26, 2026
abaae85
Revert "test: remove GONOPROXY again to check if fixed tag resolves i…
himaschal Jan 26, 2026
abe8d6d
chore(deps): update ctutils to v0.1.27-test (#17)
github-actions[bot] Jan 26, 2026
1ddf0a9
chore: update GONOPROXY indentation in workflow files and add local D…
himaschal Jan 29, 2026
d1e92cb
RA-8179: improve Dockerfiles for local development by adding GOPROXY …
himaschal Feb 1, 2026
7fdd44d
chore(deps): update ctutils to v0.0.1-golem (#18)
github-actions[bot] Feb 5, 2026
7b49d54
chore(deps): update ctutils to v0.0.2-golem (#19)
himaschal Feb 9, 2026
bfbfe7a
RA-8279: Do not trace admin endpoints on the backend. These are unnec…
himaschal Feb 11, 2026
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
17 changes: 17 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,24 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CT_APP_ID }}
private-key: ${{ secrets.CT_APP_PRIVATE_KEY }}
owner: digicert
repositories: ctutils

- name: Authenticate with private ctutils
run: |
git config --global url."https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/".insteadOf "https://github.com/"

- name: Autobuild
env:
GOPRIVATE: github.com/digicert/ctutils
GONOSUMDB: github.com/digicert/ctutils
GONOPROXY: github.com/digicert/ctutils
uses: github/codeql-action/autobuild@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2

# ℹ️ Command-line programs to run using the OS shell.
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,24 @@ jobs:
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: go.mod
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CT_APP_ID }}
private-key: ${{ secrets.CT_APP_PRIVATE_KEY }}
owner: digicert
repositories: ctutils

- name: Authenticate with private ctutils
run: |
git config --global url."https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/".insteadOf "https://github.com/"

- name: golangci-lint
env:
GOPRIVATE: github.com/digicert/ctutils
GONOSUMDB: github.com/digicert/ctutils
GONOPROXY: github.com/digicert/ctutils
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.1.6
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,25 @@ jobs:
runs-on: ubuntu-latest
name: Run govulncheck
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CT_APP_ID }}
private-key: ${{ secrets.CT_APP_PRIVATE_KEY }}
owner: digicert
repositories: ctutils

- name: Authenticate with private ctutils
run: |
git config --global url."https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/".insteadOf "https://github.com/"

- id: govulncheck
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
env:
GOPRIVATE: github.com/digicert/ctutils
GONOSUMDB: github.com/digicert/ctutils
GONOPROXY: github.com/digicert/ctutils
with:
go-version-file: go.mod
go-package: ./...
51 changes: 51 additions & 0 deletions .github/workflows/test_crdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
runs-on: ubuntu-latest
env:
GOPRIVATE: github.com/digicert/ctutils
GONOSUMDB: github.com/digicert/ctutils
GONOPROXY: github.com/digicert/ctutils
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

Expand All @@ -25,13 +29,30 @@ jobs:
check-latest: true
cache: true

- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CT_APP_ID }}
private-key: ${{ secrets.CT_APP_PRIVATE_KEY }}
owner: digicert
repositories: ctutils

- name: Authenticate with private ctutils
run: |
git config --global url."https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/".insteadOf "https://github.com/"

- uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: 'v2.1.6'
args: ./storage/crdb

unit-test:
runs-on: ubuntu-latest
env:
GOPRIVATE: github.com/digicert/ctutils
GONOSUMDB: github.com/digicert/ctutils
GONOPROXY: github.com/digicert/ctutils
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

Expand All @@ -41,11 +62,28 @@ jobs:
check-latest: true
cache: true

- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CT_APP_ID }}
private-key: ${{ secrets.CT_APP_PRIVATE_KEY }}
owner: digicert
repositories: ctutils

- name: Authenticate with private ctutils
run: |
git config --global url."https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/".insteadOf "https://github.com/"

- name: Run tests
run: go test -v ./storage/crdb/... ./quota/crdbqm/...

integration:
runs-on: ubuntu-22.04
env:
GOPRIVATE: github.com/digicert/ctutils
GONOSUMDB: github.com/digicert/ctutils
GONOPROXY: github.com/digicert/ctutils
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

Expand All @@ -55,6 +93,19 @@ jobs:
check-latest: true
cache: true

- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CT_APP_ID }}
private-key: ${{ secrets.CT_APP_PRIVATE_KEY }}
owner: digicert
repositories: ctutils

- name: Authenticate with private ctutils
run: |
git config --global url."https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/".insteadOf "https://github.com/"

- name: Build before tests
run: go mod download && go build ./...

Expand Down
35 changes: 34 additions & 1 deletion .github/workflows/test_pgdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
runs-on: ubuntu-latest
env:
GOPRIVATE: github.com/digicert/ctutils
GONOSUMDB: github.com/digicert/ctutils
GONOPROXY: github.com/digicert/ctutils
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

Expand All @@ -25,14 +29,30 @@ jobs:
check-latest: true
cache: true

- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CT_APP_ID }}
private-key: ${{ secrets.CT_APP_PRIVATE_KEY }}
owner: digicert
repositories: ctutils

- name: Authenticate with private ctutils
run: |
git config --global url."https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/".insteadOf "https://github.com/"

- uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: 'v2.1.6'
args: ./storage/postgresql

integration-and-unit-tests:
runs-on: ubuntu-latest

env:
GOPRIVATE: github.com/digicert/ctutils
GONOSUMDB: github.com/digicert/ctutils
GONOPROXY: github.com/digicert/ctutils
services:
postgres:
image: postgres
Expand All @@ -56,6 +76,19 @@ jobs:
check-latest: true
cache: true

- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CT_APP_ID }}
private-key: ${{ secrets.CT_APP_PRIVATE_KEY }}
owner: digicert
repositories: ctutils

- name: Authenticate with private ctutils
run: |
git config --global url."https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/".insteadOf "https://github.com/"

- name: Build before tests
run: go mod download && go build ./...

Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/update-ctutils.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Update ctutils dependencies

on:

workflow_dispatch:
inputs:
version:
description: "Version to install (e.g. v0.1.9-test). Defaults to latest."
required: false
default: "latest"
schedule:
- cron: "0 5 * * *" # Runs daily at 05:00 UTC

jobs:
update-ctutils:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CT_APP_ID }}
private-key: ${{ secrets.CT_APP_PRIVATE_KEY }}
owner: digicert
repositories: ctutils

- name: Update ctutils
env:
GOPRIVATE: github.com/digicert/ctutils
GONOSUMDB: github.com/digicert/ctutils
GONOPROXY: github.com/digicert/ctutils
GITHUB_APP_TOKEN: ${{ steps.generate_token.outputs.token }}
VERSION_INPUT: ${{ github.event.inputs.version || 'latest' }}
run: |
set -euo pipefail

# Switch to x-access-token syntax which is standard for App tokens
git config --global url."https://x-access-token:$GITHUB_APP_TOKEN@github.com/".insteadOf "https://github.com/"

RESOLVED_VERSION="$VERSION_INPUT"
if [ "$VERSION_INPUT" = "latest" ]; then
echo "Resolving latest ctutils release from GitHub API..."
# Try getting the official 'latest' release first
API_RESPONSE=$(curl -sS -H "Authorization: Bearer $GITHUB_APP_TOKEN" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/digicert/ctutils/releases/latest || true)

RESOLVED_VERSION=$(printf '%s' "$API_RESPONSE" | jq -r '.tag_name // empty')

if [ -z "$RESOLVED_VERSION" ] || [ "$RESOLVED_VERSION" = "null" ]; then
echo "Official 'latest' release not found (possibly all pre-releases). Falling back to most recent release..."
API_RESPONSE=$(curl -sS -H "Authorization: Bearer $GITHUB_APP_TOKEN" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/digicert/ctutils/releases?per_page=1")
RESOLVED_VERSION=$(printf '%s' "$API_RESPONSE" | jq -r '.[0].tag_name // empty')
fi

if [ -z "$RESOLVED_VERSION" ] || [ "$RESOLVED_VERSION" = "null" ]; then
echo "Error: Unable to resolve any ctutils release tag from GitHub API."
echo "API response was: $API_RESPONSE"
exit 1
fi
echo "Resolved version: $RESOLVED_VERSION"
fi

echo "VERSION_USED=$RESOLVED_VERSION" >> "$GITHUB_ENV"
echo "Updating ctutils to $RESOLVED_VERSION..."
go get github.com/digicert/ctutils@$RESOLVED_VERSION
go mod tidy

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore(deps): update ctutils to ${{ env.VERSION_USED }}"
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
branch: chore/update-ctutils-test

delete-branch: true
title: "chore(deps): update ctutils to ${{ env.VERSION_USED }}"
body: |
Updates [ctutils](https://github.com/digicert/ctutils) to version `${{ env.VERSION_USED }}`.

Auto-generated by GitHub Actions.
labels: |
dependencies
automated pr
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@
/trillian_map_server
default.etcd
cockroach-data/
server/.DS_Store
.DS_Store
cmd/trillian_log_server/trillian_log_server
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- [Using the Code](#using-the-code)
- [MySQL Setup](#mysql-setup)
- [Integration Tests](#integration-tests)
- [Observability](#observability)
- [Working on the Code](#working-on-the-code)
- [Rebuilding Generated Code](#rebuilding-generated-code)
- [Updating Dependencies](#updating-dependencies)
Expand Down Expand Up @@ -156,6 +157,51 @@ This runs a multi-process test:
You can find instructions on how to deploy Trillian in [deployment](/deployment)
and [examples/deployment](/examples/deployment) directories.

### Observability

Trillian log server and signer support OpenTelemetry-compliant distributed
tracing and structured logging via the [ctutils](https://github.com/digicert/ctutils)
shared library. This enables end-to-end request tracing and consistent log
formatting across Trillian backend services.

#### Distributed Tracing

Configuration is via environment variables:

| Variable | Description | Default |
|----------|-------------|---------|
| `OTEL_ENABLED` | Enable OpenTelemetry | `false` |
| `OTEL_EXPORTER` | Exporter type (`otlp` or `stdout`) | `stdout` |
| `OTEL_COLLECTOR_ENDPOINT` | OTLP collector URL | `localhost:4317` |
| `OTEL_SERVICE_NAME` | Service name for traces | service-specific |
| `OTEL_SAMPLE_RATIO` | Sampling ratio (0.0-1.0) | `1.0` |

Values outside the 0.0-1.0 range for `OTEL_SAMPLE_RATIO` are validated and handled by the underlying [`ctutils`](https://github.com/digicert/ctutils) library; consult its documentation for details on how such values are treated.

Example:

```bash
export OTEL_ENABLED=true
export OTEL_EXPORTER=otlp
export OTEL_COLLECTOR_ENDPOINT=http://otel-collector:4317
export OTEL_SERVICE_NAME=trillian-log-server
export OTEL_SAMPLE_RATIO=0.1
```

When enabled, Trillian services will:
- Accept incoming trace context from gRPC requests
- Propagate trace context to downstream services
- Export traces to the configured OTLP collector

#### Logging

The following environment variables control the logging format and level:

| Variable | Description | Default |
|----------|-------------|---------|
| `LOG_FORMAT` | Format for log output (`text` or `json`) | `text` |
| `LOG_LEVEL` | Logging level (`DEBUG`, `INFO`, `WARN`, `ERROR`) | `INFO` |

## Working on the Code

Developers who want to make changes to the Trillian codebase need some
Expand Down
Loading
Loading