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 extension functions for Ktor plugins #10963

Merged
merged 5 commits into from
May 16, 2024

Conversation

marychatte
Copy link
Contributor

@marychatte marychatte commented Mar 27, 2024

Resolves #10617
Earlier, an issue about adding extension functions for plugins that allow writing existing code in the Ktor DSL style was opened.
In this PR, such new functions were added.
These new functions we used in the example where also can be found examples of usages new functions for server and client

@marychatte marychatte requested a review from a team as a code owner March 27, 2024 11:22
Copy link

linux-foundation-easycla bot commented Mar 27, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Comment on lines 43 to 55
fun capturedRequestHeaders(vararg headers: String) {
capturedRequestHeaders(headers.asIterable())
}

fun capturedRequestHeaders(headers: Iterable<String>) {
setCapturedRequestHeaders(headers.toList())
}

fun setCapturedResponseHeaders(vararg headers: String) = setCapturedResponseHeaders(headers.asList())

fun setCapturedResponseHeaders(headers: List<String>) {
httpAttributesExtractorBuilder.setCapturedResponseHeaders(headers)
}
Copy link
Member

Choose a reason for hiding this comment

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

@marychatte would it make sense to deprecate the set*() methods?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, thanks. I will do it

@marychatte marychatte requested a review from trask April 25, 2024 20:11
@laurit laurit added this to the v2.4.0 milestone May 9, 2024
@marychatte
Copy link
Contributor Author

Hi! I just wanted to ask if there are any estimates when the PR can be merged?

@trask trask merged commit 10224db into open-telemetry:main May 16, 2024
53 checks passed
@trask
Copy link
Member

trask commented May 16, 2024

hey @marychatte! sorry for the delay, just merged and it will be included in the upcoming release

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.

Add extension functions for Ktor plugins
3 participants