Tracing

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET
POST
GET
POST
POST
GET

Retrieve tracing spans attributes

Required API key scopes

tracing:read

Query parameters

  • attribute_type
    string
    One of: "span""resource"
  • limit
    integer
  • offset
    integer
  • search
    string

Example request

GET /api/environments/:project_id/tracing/spans/attributes
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/tracing/spans/attributes/

Example response

Status 200 No response body

Retrieve tracing spans attributes

Required API key scopes

tracing:read

Query parameters

  • attribute_type
    string
    One of: "span""resource"
  • limit
    integer
  • offset
    integer
  • search
    string

Example request

GET /api/environments/:project_id/tracing/spans/attributes
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/tracing/spans/attributes/

Example response

Status 200 No response body

Create tracing spans query

Required API key scopes

tracing:read

Request parameters

  • query

Example request

POST /api/environments/:project_id/tracing/spans/query
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/tracing/spans/query/\
-d query=undefined

Example response

Status 200 No response body

Create tracing spans query

Required API key scopes

tracing:read

Request parameters

  • query

Example request

POST /api/environments/:project_id/tracing/spans/query
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/tracing/spans/query/\
-d query=undefined

Example response

Status 200 No response body

Retrieve tracing spans service names

Required API key scopes

tracing:read

Query parameters

  • dateRange
    string
  • search
    string

Example request

GET /api/environments/:project_id/tracing/spans/service-names
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/tracing/spans/service-names/

Example response

Status 200 No response body

Retrieve tracing spans service names

Required API key scopes

tracing:read

Query parameters

  • dateRange
    string
  • search
    string

Example request

GET /api/environments/:project_id/tracing/spans/service-names
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/tracing/spans/service-names/

Example response

Status 200 No response body

Create tracing spans sparkline

Required API key scopes

tracing:read

Request parameters

  • query

Example request

POST /api/environments/:project_id/tracing/spans/sparkline
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/tracing/spans/sparkline/\
-d query=undefined

Example response

Status 200 No response body

Create tracing spans sparkline

Required API key scopes

tracing:read

Request parameters

  • query

Example request

POST /api/environments/:project_id/tracing/spans/sparkline
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/tracing/spans/sparkline/\
-d query=undefined

Example response

Status 200 No response body

Create tracing spans trace

Required API key scopes

tracing:read

Path parameters

  • trace_id
    string

Request parameters

  • dateRange

Example request

POST /api/environments/:project_id/tracing/spans/trace/:trace_id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/tracing/spans/trace/:trace_id/\
-d dateRange=undefined

Example response

Status 200 No response body

Create tracing spans trace

Required API key scopes

tracing:read

Path parameters

  • trace_id
    string

Request parameters

  • dateRange

Example request

POST /api/environments/:project_id/tracing/spans/trace/:trace_id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/tracing/spans/trace/:trace_id/\
-d dateRange=undefined

Example response

Status 200 No response body

Retrieve tracing spans values

Required API key scopes

tracing:read

Query parameters

  • attribute_type
    string
    One of: "span""resource"
  • key
    string
  • limit
    integer
  • offset
    integer
  • value
    string

Example request

GET /api/environments/:project_id/tracing/spans/values
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/tracing/spans/values/

Example response

Status 200 No response body

Retrieve tracing spans values

Required API key scopes

tracing:read

Query parameters

  • attribute_type
    string
    One of: "span""resource"
  • key
    string
  • limit
    integer
  • offset
    integer
  • value
    string

Example request

GET /api/environments/:project_id/tracing/spans/values
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/tracing/spans/values/

Example response

Status 200 No response body

Community questions

Questions about this page? or post a community question.