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

feat(s2n-quic-core): add metrics trait #2331

Closed
wants to merge 1 commit into from
Closed

Conversation

camshaft
Copy link
Contributor

@camshaft camshaft commented Sep 25, 2024

Description of changes:

This change adds a Metric trait to enable future integration with metric systems.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft camshaft marked this pull request as ready for review September 25, 2024 01:15
@@ -0,0 +1,17 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// A Recorder should arrange to emit the properties and counters on Drop into some output.

Maybe?

I wonder if we should also note in register_counter that the counter shouldn't be used after dropping the recorder (i.e., that might be a no-op rather than incrementing a counter still). I don't think it makes sense to have the Counter borrow from the Recorder -- too constraining to manage those lifetimes -- but documenting the intended lifecycle seems like a good idea.

@camshaft
Copy link
Contributor Author

Closing in favor of #2335

@camshaft camshaft closed this Sep 28, 2024
@camshaft camshaft deleted the metrics-trait branch September 28, 2024 00:03
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.

2 participants