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

Response time OTel metric #223

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Response time OTel metric #223

merged 2 commits into from
Jan 24, 2024

Conversation

raphael-theriault-swi
Copy link
Member

Adds the response time metric

@raphael-theriault-swi raphael-theriault-swi requested a review from a team as a code owner January 23, 2024 22:12
Copy link
Contributor

@cheempz cheempz left a comment

Choose a reason for hiding this comment

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

LGTM, nice refactor/renaming to boot, thanks @raphael-theriault-swi! Not sure if you've ad-hoc tested to confirm that the histograms are indeed DELTA aggregation, I think Python and Java had to explicitly set that.

packages/solarwinds-apm/src/init.ts Show resolved Hide resolved
transaction: string | undefined,
) {
const method = span.attributes[SemanticAttributes.HTTP_METHOD]
const statusCode = span.attributes[SemanticAttributes.HTTP_STATUS_CODE]
Copy link
Contributor

Choose a reason for hiding this comment

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

Something I didn't even think about until now ;p -- does the JS lambda instrumentation always represent a lambda invocation as an HTTP server span, i.e. we always get the method and status_code? Back when adding support in AO it was a horror to find out the way a function is invoked produces different request context payload and only the "via API Gateway" (which now the Function URL makes easy) had HTTP type info in the payload.

Not a blocker for this PR, just curious.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll need to double check

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like these attributes are actually never set for Lambda spans at the moment

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, as discussed at standup the metric would just be tagged with whatever attributes are available then.

packages/sdk/src/metrics/serverless.ts Show resolved Hide resolved
@raphael-theriault-swi raphael-theriault-swi merged commit be422ed into main Jan 24, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants