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 documentation for SpanAttributeKey #137

Open
adam-fowler opened this issue Dec 14, 2023 · 0 comments
Open

Add documentation for SpanAttributeKey #137

adam-fowler opened this issue Dec 14, 2023 · 0 comments
Labels
area/documentation Improvements or additions to documentation.
Milestone

Comments

@adam-fowler
Copy link
Contributor

I only found this by mistake. It isn't obvious from the reference documentation how you would use this.

I'm assuming it works as follows.

extension SpanAttribute {
    var httpMethod: SpanAttributeKey<String> { .init(name: "http.method") }
}
span.attributes.httpMethod = .string("GET")

Is there anyway to get this to work

func setMethod(_ method: String) {
    span.attributes.httpMethod = method
}
@ktoso ktoso added this to the 1.1.x milestone Feb 1, 2024
@FranzBusch FranzBusch added the area/documentation Improvements or additions to documentation. label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation.
Projects
None yet
Development

No branches or pull requests

3 participants