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

Add metric and span support for CBOR serialize/deserialize #566

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

Madrigal
Copy link
Contributor

@Madrigal Madrigal commented Jan 28, 2025

Description

When doing some testing for CBOR, I realized we were not publishing metrics for serialization and deserialization. This PR fixes that.

Operation metrics are already being generated for CBOR methods as part of OperationMetricsStruct, so this just starts using them.

Note that there's no service that handles CBOR currently on the SDK, so this change won't have a corresponding change on the SDK

Testing

There are currently no methods on the SDK that directly use CBOR as their protocol, so testing was done as follows:

  1. Modify a service that supports CBOR JSON description to generate CBOR methods
  2. Run make generate
  3. Run make to run all tests
  4. Make calls. Ensure that both serialize and deserialize metrics are being published

Not sure if we have any unit or integration tests for this, but it would be nice to add them

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

@Madrigal Madrigal requested review from a team as code owners January 28, 2025 17:13
@lucix-aws
Copy link
Contributor

We do have one service - the downstream protocol test - did you check that this regenerates there and compiles / tests OK?

@Madrigal
Copy link
Contributor Author

We do have one service - the downstream protocol test - did you check that this regenerates there and compiles / tests OK?

Yes, my bad, adding that to the list of things tested (running make to test everything under the sun)

What I meant is that I don't think we have a test for "does creating a service with X protocol generates metric Y?".

@Madrigal Madrigal merged commit 0681fa9 into main Jan 28, 2025
11 checks passed
@Madrigal Madrigal deleted the feat-add-serializer-timer branch January 28, 2025 18:08
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.

3 participants