Skip to content

[CU-86b90ukc7] Add OTLP telemetry submission after publisher question execution#173

Open
angelo-DNAStack wants to merge 9 commits intomainfrom
Add_metrics_proxy_endpoint_for_AAAS_telemetry-CU-86b90ukc7
Open

[CU-86b90ukc7] Add OTLP telemetry submission after publisher question execution#173
angelo-DNAStack wants to merge 9 commits intomainfrom
Add_metrics_proxy_endpoint_for_AAAS_telemetry-CU-86b90ukc7

Conversation

@angelo-DNAStack
Copy link
Copy Markdown
Contributor

Summary

  • Adds opt-in telemetry: set DNASTACK_METRICS_ENABLED=true to submit an OTLP trace span to collection-service after each omics publisher questions ask execution
  • Fire-and-forget — failures are silently swallowed and never surface to the user
  • Spans include question name, collection, outcome (success/error), timing, and Python/client version

Changes

  • dnastack/feature_flags.pymetrics_enabled flag backed by DNASTACK_METRICS_ENABLED env var
  • dnastack/cli/commands/publisher/questions/telemetry.pybuild_otlp_span and submit_telemetry helpers
  • dnastack/client/collections/client.pysubmit_telemetry(otlp_payload) method posting to POST /otlp/v1/traces
  • dnastack/cli/commands/publisher/questions/commands.py — timing + telemetry submission in ask_question
  • CLAUDE.md — replaced stale pyenv setup instructions with uv run guidance

Test plan

  • make test-unit passes
  • With DNASTACK_METRICS_ENABLED=true, verify submit_telemetry is called after ask completes
  • With flag unset, verify no telemetry is submitted
  • Network failure during telemetry does not cause the command to fail

🤖 Generated with Claude Code

@platform-automation-dnastack
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 17, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11088 6610 60% 30% 🟢

New Files

File Coverage Status
dnastack/cli/commands/publisher/questions/telemetry.py 91% 🟢
TOTAL 91% 🟢

Modified Files

File Coverage Status
dnastack/cli/commands/publisher/questions/commands.py 100% 🟢
dnastack/client/collections/client.py 43% 🟢
dnastack/feature_flags.py 95% 🟢
TOTAL 79% 🟢

updated for commit: cfdfeda by action🐍

@github-actions
Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11087 6609 60% 30% 🟢

New Files

File Coverage Status
dnastack/cli/commands/publisher/questions/telemetry.py 90% 🟢
TOTAL 90% 🟢

Modified Files

File Coverage Status
dnastack/cli/commands/publisher/questions/commands.py 100% 🟢
dnastack/client/collections/client.py 43% 🟢
dnastack/feature_flags.py 95% 🟢
TOTAL 79% 🟢

updated for commit: c281bb4 by action🐍

…env var

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 94.59459% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@90c3aa8). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...tack/cli/commands/publisher/questions/telemetry.py 90.90% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #173   +/-   ##
=======================================
  Coverage        ?   59.61%           
=======================================
  Files           ?      181           
  Lines           ?    11088           
  Branches        ?        0           
=======================================
  Hits            ?     6610           
  Misses          ?     4478           
  Partials        ?        0           
Flag Coverage Δ
unittests 59.61% <94.59%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants