Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A big collection of updates #40

Merged
merged 13 commits into from
Jan 3, 2024

Conversation

Smalls1652
Copy link
Owner

@Smalls1652 Smalls1652 commented Jan 3, 2024

Type of change

  • 🌟 New feature
  • 💪 Enhancement
  • 🪳 Bug fix
  • 🧹 Maintenance

Description

This PR exploded in size and contains quite a bit of changes (Some of the changes were too related). Here's what's been changed:

  • Refactored the CommandMetricsMeterProviderBuilderExtensions into a generic class for OpenTelemetry extension methods. It includes a new extension method for adding the core MuzakBot sources to the trace provider.
  • Added classes to use for iTunes API activity traces.
  • Added classes to use for MusicBrainz API activity traces.
  • Created classes to handle creating activities for OdesliService, ItunesApiService, MusicBrainzService, and ShareMusicCommandModule respectively.
    • They contain extension methods for creating Activity objects from ActivitySource objects.
  • Implemented activity traces into OdesliService, ItunesApiService, and MusicBrainzService.
  • Optimized the handling of HttpClient usage in OdesliService, ItunesApiService, and MusicBrainzService.
    • Primarily adding a using statement when the HttpClient is initialized so it's properly disposed of at the end of execution.
  • Added code docs for many new and existing classes.
  • Implemented passing the ID of the Activity object to dependent services/methods used in ShareMusicCommandModule.
    • This is to ensure those methods are correlated to the executed commands in the telemetry.

Related issues

None

- Implements activity tracing
- Added code docs
- Implemented IDisposable
- Added using statement for created HttpClients
- Implements activity tracing
- Added code docs
- Implemented IDisposable
- Added using statement for created HttpClients
- Implements activity tracing
- Added code docs
- Implemented IDisposable
- Added using statement for created HttpClients
- Implements new extension methods for creating activities
- Implemented passing the activity ID to dependent services
@Smalls1652 Smalls1652 added documentation Improvements or additions to documentation enhancement New feature or update to an existing feature labels Jan 3, 2024
@Smalls1652 Smalls1652 self-assigned this Jan 3, 2024
@Smalls1652 Smalls1652 changed the title A big collection of changes A big collection of updates Jan 3, 2024
@Smalls1652 Smalls1652 marked this pull request as ready for review January 3, 2024 19:41
@Smalls1652 Smalls1652 merged commit 782bf58 into main Jan 3, 2024
2 checks passed
@Smalls1652 Smalls1652 deleted the update/oops/i-included-too-much-in-this-branch branch January 3, 2024 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or update to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant