-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* configure otel collector locally * use env variable to set jaeger endpoint * add code to send traces to lightstep * add deployment for the collector * change deploy configuration to point to collector * fix documentation and fix test * fix tests * don't convert trace if it is empty * enable telemetry in all deployments * increase retry delay due to collector delay * set as 5s * set as 10s * rollback retry delay * add amount of retrieved spans in trace * record errors * add trace and span ID to trace * downgrade otlp to 0.12 * go mod tidy * increase time for polling in integration instance * move deploy script from github actions to script file * rename otel folder to local-config * replace localhost with otel-collector in collector sample configuration * remove networks from compose file
- Loading branch information
1 parent
437f068
commit 40896a8
Showing
17 changed files
with
269 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Update dependency deployments | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- k8s | ||
|
||
jobs: | ||
apply: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install envsubst | ||
run: apt-get install -y gettext-base | ||
|
||
- uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 | ||
with: | ||
service_account_key: ${{ secrets.GKE_SA_KEY }} | ||
project_id: ${{ secrets.GKE_PROJECT }} | ||
|
||
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e | ||
with: | ||
cluster_name: ${{ secrets.GKE_CLUSTER }} | ||
location: ${{ secrets.GKE_ZONE }} | ||
credentials: ${{ secrets.GKE_SA_KEY }} | ||
|
||
- name: Apply | ||
run: ./k8s/deploy-collector.sh | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: collector-config | ||
data: | ||
collector.yaml: | | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
http: | ||
processors: | ||
batch: | ||
# Data sources: traces | ||
probabilistic_sampler: | ||
hash_seed: 22 | ||
sampling_percentage: 100 | ||
exporters: | ||
logging: | ||
logLevel: debug | ||
jaeger: | ||
endpoint: jaeger-collector.tracetest.svc.cluster.local:14250 | ||
tls: | ||
insecure: true | ||
otlphttp: | ||
traces_endpoint: https://ingest.lightstep.com:443/traces/otlp/v0.6 | ||
metrics_endpoint: https://ingest.lightstep.com:443/metrics/otlp/v0.9 | ||
headers: {"lightstep-access-token": "${LIGHTSTEP_TOKEN}"} | ||
compression: gzip | ||
service: | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
processors: [batch, probabilistic_sampler] | ||
exporters: [jaeger, otlphttp] | ||
--- | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: otel-collector | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: otel-collector | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: otel-collector | ||
spec: | ||
containers: | ||
- name: otelcol | ||
args: | ||
- --config=/conf/collector.yaml | ||
image: otel/opentelemetry-collector:0.54.0 | ||
volumeMounts: | ||
- mountPath: /conf | ||
name: collector-config | ||
volumes: | ||
- configMap: | ||
items: | ||
- key: collector.yaml | ||
path: collector.yaml | ||
name: collector-config | ||
name: collector-config | ||
--- | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: otel-collector | ||
spec: | ||
ports: | ||
- name: grpc-otlp | ||
port: 4317 | ||
protocol: TCP | ||
targetPort: 4317 | ||
selector: | ||
app.kubernetes.io/name: otel-collector | ||
type: ClusterIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
envsubst < k8s/collector.yml | kubectl apply -n tracetest -f - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
http: | ||
|
||
|
||
processors: | ||
batch: | ||
|
||
# Data sources: traces | ||
probabilistic_sampler: | ||
hash_seed: 22 | ||
sampling_percentage: 100 | ||
|
||
exporters: | ||
logging: | ||
logLevel: debug | ||
jaeger: | ||
endpoint: ${JAEGER_ENDPOINT} | ||
tls: | ||
insecure: true | ||
otlphttp: | ||
traces_endpoint: https://ingest.lightstep.com:443/traces/otlp/v0.6 | ||
metrics_endpoint: https://ingest.lightstep.com:443/metrics/otlp/v0.9 | ||
headers: {"lightstep-access-token": "${LIGHTSTEP_TOKEN}"} | ||
compression: gzip | ||
|
||
service: | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
processors: [batch, probabilistic_sampler] | ||
exporters: [jaeger, otlphttp] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.