Skip to content

feat: enhance tracing support with detailed spans#156

Merged
d0ugal merged 3 commits intomainfrom
feat/enhance-tracing-support
Nov 1, 2025
Merged

feat: enhance tracing support with detailed spans#156
d0ugal merged 3 commits intomainfrom
feat/enhance-tracing-support

Conversation

@d0ugal
Copy link
Copy Markdown
Owner

@d0ugal d0ugal commented Oct 31, 2025

Summary

This PR enhances the OpenTelemetry tracing support in the GHCR exporter to match the detailed tracing implementation in the filesystem exporter.

Changes

  • collectSinglePackage(): Enhanced with detailed retry tracking, collection events, and duration tracking
  • collectOwnerPackages(): Added comprehensive span for owner package discovery with package count and success tracking
  • collectPackageMetrics(): Added detailed spans for package info, versions, and metrics update operations
  • getPackageInfo(): Added span for API request, JSON decoding, and version count tracking
  • getPackageVersions(): Added span for API request, JSON decoding, and version count tracking
  • makeGitHubAPIRequest(): Added detailed spans for user/org endpoint attempts with duration and status code tracking
  • updatePackageMetrics(): Added span for metrics update operations with download stats tracking
  • getPackageDownloadStats(): Will be enhanced in future updates if needed

All spans include:

  • Duration tracking for performance analysis
  • Success/failure indicators
  • Relevant attributes for filtering and analysis (package names, owners, repos, API paths, etc.)
  • Error recording with context
  • Event markers for important milestones

This provides comprehensive visibility into GHCR exporter operations, similar to what we have in the filesystem exporter.

d0ugal and others added 3 commits October 31, 2025 14:58
Add comprehensive tracing spans throughout the GHCR collector to match
the detailed tracing implementation in filesystem-exporter.

Key enhancements:
- Detailed spans for collectPackageMetrics, collectOwnerPackages
- Spans for API operations (getPackageInfo, getPackageVersions)
- Detailed tracing in makeGitHubAPIRequest (user/org endpoint attempts)
- Tracing in updatePackageMetrics and getPackageDownloadStats
- Duration tracking and event markers for all operations
- Error recording with context throughout

This provides comprehensive visibility into GHCR exporter operations.
@d0ugal d0ugal enabled auto-merge (rebase) October 31, 2025 20:51
@d0ugal d0ugal disabled auto-merge November 1, 2025 09:41
@d0ugal d0ugal merged commit 90a171e into main Nov 1, 2025
@d0ugal d0ugal deleted the feat/enhance-tracing-support branch November 1, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant