Skip to content

Add body data elements for pageview context

What does this MR do?

Adds 3 new body data elements for page_type_id, project_id, and namespace_id

Related to: https://gitlab.com/gitlab-org/telemetry/issues/110

Additional body data elements are needed in order to construct the Snowplow pageview context:

{
    schema: "iglu:com.gitlab/pageview_context/jsonschema/1-0-0",
    data: {
        page_type: 'projects:issues:show', --example uses existing body element 'page' value
        page_type_id: 1317, --the ID of the issue in this page_type example
        namespace_id: 4347861, --the namespace ID of the project
        project_id: 4409640, --the Project ID for the issue
    }
}

page_type - will use the value of the existing body data element page

page_type_id - will return the ID of the controller type being viewed

namespace_id - will return the ID of the namespace for the controller object

project_id - will retun the Project ID for the controller object

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Jackie Fraser

Merge request reports