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

Project: [Starfish] Add http.request.method to span data #20

Open
12 tasks done
AbhiPrasad opened this issue Jul 25, 2023 · 7 comments
Open
12 tasks done

Project: [Starfish] Add http.request.method to span data #20

AbhiPrasad opened this issue Jul 25, 2023 · 7 comments

Comments

@AbhiPrasad
Copy link
Member

AbhiPrasad commented Jul 25, 2023

Project Board

https://github.com/orgs/getsentry/projects/150/views/1

Description

In getsentry/team-webplatform-meta#60 we added the necessary span data changes to the Python and JS SDKs for starfish. This issue tracks adding these fields to the remaining SDKs.

These include the following:

  1. HTTP information

The primary require is to add a new field to the span data field, http.request.method, representing the http method (GET, POST, PUT).

If possible, adding any of the OpenTelemetry common http attributes should be attempted, but is not a requirement.

RFC

No response

Slack-Channel

#discuss-starfish

Notion Document(s)

https://www.notion.so/sentry/0333024900d14a3f8dd398a36ddb55bd?v=681d28a5fa2a4c4aa6437e49a087a241

Stakeholder(s)

@alexjillard

Team(s)

Web Backend

@AbhiPrasad
Copy link
Member Author

Previously this task had the requirement to add cache attributes like below (documenting for posterity). Because we are prioritizing the the database module, this requirement is now being dropped. Cache information will be added to another task.

  1. Cache information

Add cache.hit and cache.item_size as per: https://develop.sentry.dev/sdk/performance/span-data-conventions/#web-server

Any call to cache that doesn't return data (null) is treated as a miss. We define a span that has a cache hit as having the span data field cache.hit as true. Might require SDK to patch cache abstractions of framework.

Also, add a field to cache spans that defines how big the item that is being get/set: cache.item_size. This is an integer and should be in bytes.

@AbhiPrasad
Copy link
Member Author

moved db.system task to #19 so that all database specific attributes were scoped there.

@AbhiPrasad AbhiPrasad changed the title [Starfish] Add starfish attributes to span data [Starfish] Add starfish v1 attributes to span data Aug 9, 2023
@AbhiPrasad
Copy link
Member Author

otel ended up renaming http.method to http.request.method. Updated the task for this, and opened getsentry/relay#2396 to make relay recognize it.

@adinauer
Copy link
Member

@AbhiPrasad do we only need http.request.method for HTTP clients? If we want this for server side transactions as well, where should we put the method? I don't see method in https://github.com/getsentry/relay/blob/master/relay-general/src/protocol/contexts/response.rs . We recently had a similar question regarding status code and that's where it ended up for transactions.

@AbhiPrasad
Copy link
Member Author

do we only need http.request.method for HTTP clients

I think it makes sense to add method to the Response context. Let me open up a PR to Relay.

@AbhiPrasad
Copy link
Member Author

Actually for a response the status code should be good enough for this. We already have the method on the request context https://github.com/getsentry/relay/blob/fd955bc85ccd80fb4763bb04254b4d4a7c9d7200/relay-general/src/protocol/request.rs#L443-L444

@adinauer
Copy link
Member

Turns out we already put it on the request in the Java SDK 🤣 .

@stephanie-anderson stephanie-anderson changed the title [Starfish] Add starfish v1 attributes to span data [Starfish] Add starfish v1 attribute http.request.method to span data Sep 11, 2023
@stephanie-anderson stephanie-anderson changed the title [Starfish] Add starfish v1 attribute http.request.method to span data Project: [Starfish] Add starfish v1 attribute http.request.method to span data Sep 12, 2023
@stephanie-anderson stephanie-anderson changed the title Project: [Starfish] Add starfish v1 attribute http.request.method to span data Project: [Starfish] Add http.request.method to span data Oct 23, 2023
@stephanie-anderson stephanie-anderson modified the milestones: [1] Discovery, Tracing Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants