mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 14:51:44 +00:00
observability: Adds useful data to traces from gosyntect.Highlight (#64121)
This might help with debugging in the future. ## Test plan N/A
This commit is contained in:
parent
7e82c27ab5
commit
cf5bc9f48e
@ -161,7 +161,10 @@ func (c *Client) Highlight(ctx context.Context, q *Query, format HighlightRespon
|
||||
q.Filetype = languages.NormalizeLanguage(q.Filetype)
|
||||
|
||||
tr, ctx := trace.New(ctx, "gosyntect.Highlight",
|
||||
attribute.String("filepath", q.Filepath))
|
||||
attribute.String("filepath", q.Filepath),
|
||||
attribute.String("language", q.Filetype),
|
||||
attribute.String("engine", q.Engine),
|
||||
)
|
||||
defer tr.EndWithErr(&err)
|
||||
|
||||
if isTreesitterBased(q.Engine) && !IsTreesitterSupported(q.Filetype) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user