Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .config/mise/tasks/semconv/check
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ trap 'rm -rf "$generated"' EXIT HUP INT TERM

"$root/.config/mise/tasks/semconv/generate" "$generated"
diff -ru "$expected" "$generated"

if grep -n '"eventstore-' \
"$root/src/EventStore.Core/MetricsBootstrapper.cs" \
"$root/src/EventStore.Projections.Core/ProjectionsSubsystem.cs"
then
echo "Built-in metric names must come from the generated MetricNames catalog." >&2
exit 1
fi
18 changes: 16 additions & 2 deletions .config/mise/tasks/semconv/generate
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,32 @@ set -eu
root=$(CDPATH='' cd -- "$(dirname -- "$0")/../../../.." && pwd)
output=${1:-"$root/src/TrogonEventStore.SemanticConventions/Generated"}
registry_version=$(sed -n '1p' "$root/otel/semconv/registry-version")
registry="https://github.com/open-telemetry/semantic-conventions@${registry_version}[model]"
registry="$root/otel/semconv/registry"
official_registry="https://github.com/open-telemetry/semantic-conventions@${registry_version}[model]"
staging=$(mktemp -d)
trap 'rm -rf "$staging"' EXIT HUP INT TERM

grep -Fqx " registry_path: $official_registry" "$registry/manifest.yaml"

weaver registry check \
--future \
--registry "$registry"

weaver registry generate csharp "$staging" \
--future \
--registry "$registry" \
--templates "$root/otel/semconv/templates"
--templates "$root/otel/semconv/templates" \
-D attributes=false \
-D custom_attributes=true \
-D official_metrics=false

weaver registry generate csharp "$staging" \
--future \
--registry "$official_registry" \
--templates "$root/otel/semconv/templates" \
-D custom_attributes=false \
-D metrics=false \
-D official_metrics=true

set -- "$staging"/*.g.cs
[ -e "$1" ] || exit 1
Expand Down
712 changes: 141 additions & 571 deletions docs/diagnostics/metrics.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions otel/semconv/registry/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: trogon_eventstore
description: Semantic conventions for TrogonEventStore telemetry.
schema_url: https://trogondb.com/schemas/0.1.0
dependencies:
- schema_url: https://opentelemetry.io/schemas/1.43.0
registry_path: https://github.com/open-telemetry/semantic-conventions@v1.43.0[model]
Loading
Loading