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

refactor!: rename metrics and remove redundant metrics #973

Merged
merged 5 commits into from
Oct 13, 2023

Conversation

aajtodd
Copy link
Contributor

@aajtodd aajtodd commented Oct 9, 2023

Issue #

n/a

Description of changes

  • refactor!: remove smithy.client.request.size, smithy.client.response.size, and smithy.client.retries metrics
  • refactor!: rename smithy.client.* metrics to smithy.client.call.*
  • refactor: Add SpanContext to TraceSpan
  • refactor!: Remove setContext from fluent log builder in-favor of explicitly setting span context K/V pairs

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

{
"id": "c063605b-4702-4d8a-a841-2e0b7aa78e78",
"type": "misc",
"description": "**BREAKING**: Remove `smithy.client.request.size`, `smithy.client.response.size`, `smithy.client.retires` metrics. Rename all `smithy.client.*` metrics to `smithy.client.call.*`."
Copy link
Contributor

@0marperez 0marperez Oct 9, 2023

Choose a reason for hiding this comment

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

Nit: There's a type here in retries

*/
public interface SpanContext {
public companion object {
public val Invalid: SpanContext = InvalidSpanContext
Copy link
Contributor

Choose a reason for hiding this comment

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

When would an "invalid" SpanContext ever be used/desired? If it's meant to be used as a default when no context is set, I'd avoid the word "invalid"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://opentelemetry.io/docs/specs/otel/trace/api/#isvalid

Spans may not be valid when there is no configured telemetry provider.

Comment on lines +37 to +38
override val traceId: String = "00000000000000000000000000000000"
override val spanId: String = "0000000000000000"
Copy link
Contributor

Choose a reason for hiding this comment

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

How are these values determined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OTel spec

@aajtodd aajtodd force-pushed the refactor-telemetry branch from 126b232 to ca7ce63 Compare October 11, 2023 18:35
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@aajtodd aajtodd merged commit 681379d into main Oct 13, 2023
13 checks passed
@aajtodd aajtodd deleted the refactor-telemetry branch October 13, 2023 17:19
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.

4 participants