sentry-symfony icon indicating copy to clipboard operation
sentry-symfony copied to clipboard

support operation duration

Open gclove opened this issue 3 years ago • 11 comments

Can we support operation duration? I think there is such a display in the vue package.

image

image

gclove avatar Sep 18 '21 02:09 gclove

I don't see why not, but I'm not sure how to do this nor if there is something that we really have to do. Maybe @kamilogorek can shed some light on this?

ste93cry avatar Sep 18 '21 10:09 ste93cry

It seems operations are broken out here if they match ["http", "db", "browser", "resource"] as per https://github.com/getsentry/sentry/blob/e24037645f84f5531e5a9ab5ab5851ae74cca9c6/src/sentry/projectoptions/defaults.py#L75

So as long as a PHP app records the spans for e.g. database queries as something like "db.query" then that duration will be graphed here.

There is an issue here to document the spec for span ops: https://github.com/getsentry/develop/issues/392

mfb avatar Oct 20 '21 18:10 mfb

There is an issue here to document the spec for span ops

Nice catch, didn't know about these spec

So as long as a PHP app records the spans for e.g. database queries as something like "db.query" then that duration will be graphed here

In the Symfony SDK we used a different convention because we trace queries at an even deeper level by distinguishing the different phases that are involved (executing the statement, fetching the data, etc)

ste93cry avatar Oct 20 '21 20:10 ste93cry

In the Symfony SDK we used a different convention because we trace queries at an even deeper level by distinguishing the different phases that are involved (executing the statement, fetching the data, etc)

Hmm might be a good idea to change those from sql.conn.prepare to db.conn.prepare etc.?

mfb avatar Oct 20 '21 20:10 mfb

I used the sql prefix because not all databases may support prepared statements, transactions, etc, so db is misleading. I think that Sentry should instead treat the two prefixes as equal

ste93cry avatar Oct 20 '21 20:10 ste93cry

If "db" is the standard then I suppose it could even be db.sql.conn.prepare

mfb avatar Oct 20 '21 20:10 mfb

btw, I noticed Sentry has some updated docs on span operations: https://develop.sentry.dev/sdk/performance/span-operations/

mfb avatar Dec 07 '21 04:12 mfb

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Jan 12 '22 21:01 github-actions[bot]

Is there anything left to be done?

cleptric avatar Aug 17 '22 14:08 cleptric

Possibly the framework integrations need to update their span names to comply with the doc (https://develop.sentry.dev/sdk/performance/span-operations/) to allow for Sentry server to show info for them. We did this a while back in Laravel (https://github.com/getsentry/sentry-laravel/pull/533) but I'm not sure we ever looked at that for Symfony?

stayallive avatar Aug 18 '22 07:08 stayallive

@stayallive Yep, I took a look and we have to fix up some stuff over at Symfony.

cleptric avatar Aug 18 '22 12:08 cleptric

Screenshot 2022-11-21 at 17 02 55 Using v4.4 of the bundle, this works for me. let us know if you have any other problems with this.

cleptric avatar Nov 21 '22 16:11 cleptric