Este conteúdo não está disponível no idioma selecionado.

Chapter 4. Customizing Segment source


The analytics-provider-segment plugin sends the collected web analytics data to Red Hat by default. However, you can configure a new Segment source that receives web analytics data based on your needs. For configuration, you need a unique Segment write key that points to the Segment source.

Note

Create your own web analytics data collection notice for your application users.

4.1. Customizing Segment source using the Operator

You can configure integration with your Segment source by using the Red Hat Developer Hub Operator.

Prerequisites

  • You have logged in as an administrator in the OpenShift Container Platform web console.
  • You have installed Red Hat Developer Hub on OpenShift Container Platform using the Operator.

Procedure

  1. Add the following YAML code in your Backstage custom resource (CR):

    # ...
    spec:
      application:
        extraEnvs:
          envs:
            - name: SEGMENT_WRITE_KEY
              value: <segment_key> 
    1
    
    # ...
    Copy to Clipboard Toggle word wrap
    1
    Replace <segment_key> with a unique identifier for your Segment source.
  2. Save the configuration changes.

4.2. Customizing Segment source using the Helm Chart

You can configure integration with your Segment source by using the Red Hat Developer Hub Helm Chart.

Prerequisites

  • You have logged in as an administrator in the OpenShift Container Platform web console.
  • You have installed Red Hat Developer Hub on OpenShift Container Platform using the Helm Chart.

Procedure

  1. In the Developer perspective of the OpenShift Container Platform web console, go to the Helm view to see the list of Helm releases.
  2. Click the overflow menu on the Helm release that you want to use and select Upgrade.
  3. Use either the Form view or YAML view to edit the Helm configuration:

    • Using Form view

      1. Expand Root Schema Backstage Chart Schema Backstage Parameters Backstage container environment variables.
      2. Click the Add Backstage container environment variables link.
      3. Enter the name and value of the Segment key.

      4. Click Upgrade.
    • Using YAML view

      1. Add the following YAML code in your Helm configuration file:

        # ...
        upstream:
          backstage:
            extraEnvVars:
              - name: SEGMENT_WRITE_KEY
                value: <segment_key> 
        1
        
        # ...
        Copy to Clipboard Toggle word wrap
        1
        Replace <segment_key> with a unique identifier for your Segment source.
      2. Click Upgrade.

Additional resources

Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat