Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to writing metrics to the staging endpoint #202

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cloudbuild-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ steps:
script: |
#!/usr/bin/env bash
export PATH=$PATH:$(pwd)
helmfile apply -f gcp/helmfile.yaml --environment production --state-values-set-string workload_identity_project_id=$PROJECT_ID,auth_extension_project_id=$PROJECT_ID,auth_extension_quota_project_id=$PROJECT_ID,otlp_endpoint=$_OTLP_ENDPOINT
helmfile apply -f gcp/helmfile.yaml --environment production --state-values-set-string workload_identity_project_id=$PROJECT_ID,auth_extension_project_id=$PROJECT_ID,auth_extension_quota_project_id=$PROJECT_ID,otlp_endpoint=$_OTLP_ENDPOINT,otlp_staging_endpoint=$_OTLP_STAGING_ENDPOINT
# yamllint enable rule:line-length
automapSubstitutions: true
env:
Expand All @@ -51,3 +51,4 @@ steps:
- 'CLOUDSDK_CONTAINER_CLUSTER=${_GKE_CLUSTER}'
substitutions:
_OTLP_ENDPOINT: ${_OTLP_ENDPOINT}
_OTLP_STAGING_ENDPOINT: ${_OTLP_STAGING_ENDPOINT}
9 changes: 8 additions & 1 deletion gcp/opentelemetry-demo-features.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ opentelemetry-collector:
{{ if hasKey .Values "otlp_endpoint" }}
config:
exporters:
otlphttp/gcp_auth_staging:
encoding: json
{{ with .Values | getOrNil "otlp_staging_endpoint" }}
endpoint: "{{ . }}"
{{ end }}
auth:
authenticator: googleclientauth
otlphttp/gcp_auth:
encoding: json
{{ with .Values | getOrNil "otlp_endpoint" }}
Expand Down Expand Up @@ -67,5 +74,5 @@ opentelemetry-collector:
metrics/otlp:
receivers: [otlp]
processors: [k8sattributes, memory_limiter, filter/currency, resourcedetection, transform/collision, resource, resource/gcp_project_id, transform/metricprefix, batch]
exporters: [otlphttp/gcp_auth]
exporters: [otlphttp/gcp_auth_staging]
{{ end }}
Loading