Skip to content

Align HTTP span data keys #2393

@brustolin

Description

@brustolin

Description

Currently, cocoa SDK has 4 extra informations for HTTP spans that are not specified in the documentation:

    [netSpan setTagValue:[NSString stringWithFormat:@"%@", statusCode] forKey:@"http.status_code"];
    [netSpan setDataValue:sessionTask.currentRequest.HTTPMethod forKey:@"method"];
    [netSpan setDataValue:sessionTask.currentRequest.URL.path forKey:@"url"];
    [netSpan setDataValue:@"fetch" forKey:@"type"];

With the exception of the type that is not found anywhere else, every other information is duplicated.

  • status code is used as the span finish status
  • method and url are being used as the span description
### Tasks
- [ ] https://github.com/getsentry/sentry-cocoa/issues/3076
- [x] rename `method` to `http.method`
- [x] document attribute `url` for Mobile on [Span Data Convetions doc](https://develop.sentry.dev/sdk/performance/span-data-conventions/)
- [x] document `fetch` for attribute `type` for Mobile on [Span Data Convetions doc](https://develop.sentry.dev/sdk/performance/span-data-conventions/)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions