이 콘텐츠는 선택한 언어로 제공되지 않습니다.
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.
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
Add the following YAML code in your
Backstagecustom resource (CR):# ... spec: application: extraEnvs: envs: - name: SEGMENT_WRITE_KEY value: <segment_key>1 # ...- 1
- Replace
<segment_key>with a unique identifier for your Segment source.
- 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
- In the Developer perspective of the OpenShift Container Platform web console, go to the Helm view to see the list of Helm releases.
- Click the overflow menu on the Helm release that you want to use and select Upgrade.
Use either the Form view or YAML view to edit the Helm configuration:
Using Form view
-
Expand Root Schema
Backstage Chart Schema Backstage Parameters Backstage container environment variables. - Click the Add Backstage container environment variables link.
Enter the name and value of the Segment key.
- Click Upgrade.
-
Expand Root Schema
Using YAML view
Add the following YAML code in your Helm configuration file:
# ... upstream: backstage: extraEnvVars: - name: SEGMENT_WRITE_KEY value: <segment_key>1 # ...- 1
- Replace
<segment_key>with a unique identifier for your Segment source.
- Click Upgrade.
Additional resources
- To learn how to collect and analyze the same set of data, see Telemetry data collection.