Skip to content

Commit

Permalink
added custom metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippLengauer committed Oct 11, 2023
1 parent 2f8e8c1 commit 2bc04d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: gitaptly
Version: 2.9.2
Version: 2.10.0
Architecture: all
Depends: debconf, bash, jq, cron, gzip, dpkg-dev, wget, python3, python3-pip, python3-venv
Suggests: opentelemetry-shell (>= 1.0.0)
Expand Down
6 changes: 6 additions & 0 deletions package/usr/bin/gitaptly_serve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ if [ -n "$otel_root_span_id" ]; then
otel_span_attribute $otel_root_span_id http.route=/$owner/$repo
otel_span_attribute $otel_root_span_id github.repository.owner=$owner
otel_span_attribute $otel_root_span_id github.repository.name=$repo
otel_span_attribute $otel_root_span_id github.repository.file=$file
otel_metric=$(otel_metric_create "gitaptly.downloads")
otel_metric_attribute $otel_metric github.repository.owner=$owner
otel_metric_attribute $otel_metric github.repository.repo=$repo
otel_metric_attribute $otel_metric github.repository.file=$file
otel_metric_add $otel_metric 1
fi

echo "Content-Type: application/vnd.debian.binary-package"
Expand Down

0 comments on commit 2bc04d3

Please sign in to comment.