• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Logflare / logflare / aad1eb921bc98fc7111e622e720d5461966a583a
82%

Build:
DEFAULT BRANCH: main
Ran 18 Jun 2026 03:58AM UTC
Jobs 1
Files 484
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Jun 2026 03:45AM UTC coverage: 81.167% (+0.001%) from 81.166%
aad1eb921bc98fc7111e622e720d5461966a583a

push

github

web-flow
feat(telemetry): emit build commit SHA as OTel resource attribute (#3595)

* feat(telemetry): emit build commit SHA as OTel resource attribute

Surface the build's git commit SHA as a `service.commit` OTel resource
attribute so it lands in BigQuery as `resource._service_commit`. The
`VERSION`-derived `service.version` is bumped only at release time, so it
can't identify which commit the continuously-deployed staging `main`
cluster is running; the SHA gives per-build identity there.

- lib/telemetry.ex: add `commit: System.get_env("LOGFLARE_COMMIT_SHA")` to
  the metrics exporter resource. Unset -> `nil` -> serialized as "" (the
  exporter's is_atom clause), no crash.
- Dockerfile: ARG COMMIT_SHA -> ENV LOGFLARE_COMMIT_SHA in the runner stage.
- docker-ci: pass the already-computed short_sha as the COMMIT_SHA build-arg.

Cloud Build's secret_setup.Dockerfile is FROM the app image and inherits the
ENV; versioned/prod images are retags of the same dev image, so the SHA
propagates to all clusters without Cloud Build changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(telemetry): omit commit attribute when SHA unset

Build the OTel resource `service` map first and add `commit` only when
`LOGFLARE_COMMIT_SHA` is present, via `maybe_put_commit/2`, instead of
emitting an empty string. An unknown resource attribute should be absent,
not present-but-empty.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(telemetry): cover commit SHA resource attribute, drop empty SHAs

Treat empty/whitespace LOGFLARE_COMMIT_SHA as absent so an unset Docker
build-arg (which expands to "") doesn't emit service.commit: "". Extract
service_resource/1 and add tests covering the set/nil/empty/whitespace cases.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(telemetry): assert commit SHA reaches exported OTel resource

Add an end-to-end test that starts OtelMetricExporter with an
export_c... (continued)

7 of 7 new or added lines in 1 file covered. (100.0%)

3 existing lines in 3 files now uncovered.

13184 of 16243 relevant lines covered (81.17%)

5073.34 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
86.96
-0.87% lib/logflare/backends/adaptor/clickhouse_adaptor/connection_manager.ex
1
72.31
-1.54% lib/logflare/logs/search_query_executor.ex
1
14.29
-7.14% lib/logflare/system_metrics/cluster.ex
Jobs
ID Job ID Ran Files Coverage
1 aad1eb921bc98fc7111e622e720d5461966a583a.1 18 Jun 2026 03:58AM UTC 484
81.17
GitHub Action Run
Source Files on build aad1eb921bc98fc7111e622e720d5461966a583a
  • Tree
  • List 484
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • aad1eb92 on github
  • Prev Build on main (#C3F2CA85...)
  • Next Build on main (#A11C482D...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc