schema: do not use 'sourcegraph' in urlTemplate example, add doc note about urlTemplate (#41490)

This commit is contained in:
Robert Lin 2022-09-08 09:39:50 -07:00 committed by GitHub
parent 20b03825d4
commit 7a78282a5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -42,11 +42,15 @@ A link to the [exported trace](#tracing-backends) should be show up in the searc
![link to trace](https://user-images.githubusercontent.com/23356519/184953302-099bcb62-ccdb-4eed-be5d-801b7fe16d97.png)
Note that getting a trace URL requires `urlTemplate` to be configured.
### Trace a GraphQL request
To receive a traceID on a GraphQL request, include the header `X-Sourcegraph-Should-Trace: true` with the request.
The response headers of the response will now include an `x-trace` entry, which will have a URL the [exported trace](#tracing-backends).
Note that getting a trace URL requires `urlTemplate` to be configured.
## Tracing backends
Tracing backends can be configured for Sourcegraph to export traces to.

View File

@ -1239,7 +1239,7 @@
"examples": [
"https://ui.honeycomb.io/$ORG/environments/$DATASET/trace?trace_id={{ .TraceID }}",
"https://console.cloud.google.com/traces/list?tid={{ .TraceID }}&project=$PROJECT",
"https://sourcegraph.grafana.net/explore?orgId=1&left=[\"now-1h\",\"now\",\"grafanacloud-sourcegraph-traces\",{\"query\":\"{{ .TraceID }}\",\"queryType\":\"traceId\"}]",
"https://$ORGANIZATION.grafana.net/explore?orgId=1&left=[\"now-1h\",\"now\",\"$DATASOURCE\",{\"query\":\"{{ .TraceID }}\",\"queryType\":\"traceId\"}]",
"{{ .ExternalURL }}/-/debug/jaeger/trace/{{ .TraceID }}"
]
}