Skip to content

Consistency between setKnownMethods(Set<String>), setCapturedRequestHeaders(List<String>) and setCapturedResponseHeaders(List<String>) #12848

@trask

Description

@trask

Part of #12846

There's a bit of inconsistency in the Http *TelemetryBuilder classes where setKnownMethods takes a Set while setCapturedRequestHeaders and setCapturedResponseHeaders take a List:

  • setKnownMethods(Set<String>)
  • setCapturedRequestHeaders(List<String>)
  • setCapturedResponseHeaders(List<String>)

I think it makes sense to have consistence between these.

I kind of list List because it's generally a more common data type.

On the other hand, I kind of like Set because duplicates are meaningless in all of them.

An additional wrinkle is that we've already stabilized these:

  • setCapturedRequestHeaders(List<String>) in HttpClientAttributesExtractorBuilder
  • setCapturedResponseHeaders(List<String>) in HttpClientAttributesExtractorBuilder
  • setKnownMethods(Set<String>) in HttpClientAttributesExtractorBuilder
  • setKnownMethods(Set<String>) in HttpServerAttributesExtractorBuilder
  • setKnownMethods(Set<String>) in HttpServerRouteBuilder
  • setKnownMethods(Set<String>) in HttpSpanNameExtractorBuilder

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions