Skip to content

Ktor: make spanNameExtractor configurable #12842

Closed
@SIMULATAN

Description

@SIMULATAN

Whilst the semconv doesn't explicitly require the URL to be part of the span name, I would like to see more information than just the request method there.

Thus, I propose to add a simple setSpanNameExtractor method to the AbstractKtorClientTracingBuilder, similar to what #8255 did. Something like this would do just fine:

fun setSpanNameExtractor(spanNameExtractor: SpanNameExtractor<in HttpRequestData>) {
	clientBuilder.setSpanNameExtractor { spanNameExtractor }
}

#9607 already brought this topic up, but the semconv has changed since then to include the url.template if enabled. In my opinion, my proposal would allow users to implement this, should they choose to, whilst preserving the original, non-experimental default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contribution welcomeRequest makes sense, maintainers probably won't have time, contribution would be welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions