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

Feautre/cds 707 limit body attribute #21

Conversation

RafalSumislawski
Copy link
Member

No description provided.

@@ -201,6 +201,7 @@ const lambdaAutoInstrumentConfig: AwsLambdaInstrumentationConfig = {
}
return otelContext.active();
},
payloadSizeLimit: OTEL_PAYLOAD_SIZE_LIMIT,
Copy link

@zhrebicek zhrebicek Oct 18, 2023

Choose a reason for hiding this comment

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

Some context, about why this one liner helps would be nice, but approving anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a continuation of coralogix/opentelemetry-js-contrib#8

OTEL_PAYLOAD_SIZE_LIMIT is already used to limit some attributes that are produced by code located in opentelemetry-lambda. Now I also propagate it to the code of opentelemetry-js-contrib where the AwsLambdaInstrumetation is located. And there I use it to limit the size of an attribute that contains the response body (or now, the first 50kiB of the response body)

@RafalSumislawski RafalSumislawski merged commit 8fe8eee into coralogix-nodejs-autoinstrumentation Oct 18, 2023
@RafalSumislawski RafalSumislawski deleted the feautre/CDS-707-limit-body-attribute branch October 18, 2023 09:02
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