Skip to content

refactor(api): use OpenTelemetry spans in internal/api datastore and S3 upload - #827

Draft
mwbrooks wants to merge 2 commits into
mwbrooks-otel-api-appfrom
mwbrooks-otel-api-datastore
Draft

mwbrooks wants to merge 2 commits into
mwbrooks-otel-api-appfrom
mwbrooks-otel-api-datastore

Conversation

@mwbrooks

Copy link
Copy Markdown
Member

Changelog

N/A - internal refactor with no user-facing changes.

Summary

This pull request moves the 11 spans in internal/api/datastore.go and internal/api/s3_upload.go from OpenTracing to the OpenTelemetry API, the next file in the move off opentracing-go.

  • Span names and attribute types stay the same
  • The S3 file upload span used opentracing.StartSpan with ChildOf the upload span. It now starts from the upload span's context with tracer.Start, so it keeps the same parent

Stacked on #826.

Testing

  1. Run go test ./internal/api/

Notes

  • AppsDatastoreCount tags the app ID under the key count, not app. This PR keeps the key, so it changes no span data. Renaming it can be its own PR

Requirements

@mwbrooks mwbrooks added this to the Next Release milestone Nov 21, 2026
@mwbrooks mwbrooks added code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment labels Nov 21, 2026
@mwbrooks mwbrooks self-assigned this Nov 21, 2026
@codecov

codecov Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (mwbrooks-otel-api-app@68a0220). Learn more about missing BASE report.

Additional details and impacted files
@@                   Coverage Diff                    @@
##             mwbrooks-otel-api-app     #827   +/-   ##
========================================================
  Coverage                         ?   80.54%           
========================================================
  Files                            ?      246           
  Lines                            ?    18889           
  Branches                         ?        0           
========================================================
  Hits                             ?    15215           
  Misses                           ?     3674           
  Partials                         ?        0           

☔ View full report in Codecov by Harness.
📢 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

code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant