forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,078 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright The OpenTelemetry Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# This script is used to deploy collector on demo account cluster | ||
|
||
set -euo pipefail | ||
IFS=$'\n\t' | ||
set -x | ||
|
||
clusterName=$CLUSTER_NAME | ||
clusterArn=$CLUSTER_ARN | ||
region=$REGION | ||
|
||
install_reinvent_demos() { | ||
# Set the namespace and release name | ||
release_name="opentelemetry-demo" | ||
|
||
# Deploy zookeeper which is not a default component. | ||
sed -i "s/PLACEHOLDER_COMMIT_SHA/v$CI_COMMIT_SHORT_SHA/g" ./src/go_server_dd/deployment-staging.yaml | ||
kubectl apply -f ./src/go_server_dd/deployment-staging.yaml -n otel-ingest-staging | ||
|
||
# Deploy java order producer which is not a default component. | ||
sed -i "s/PLACEHOLDER_COMMIT_SHA/v$CI_COMMIT_SHORT_SHA/g" ./src/java_client_otel/deployment-staging.yaml | ||
kubectl apply -f ./src/java_client_otel/deployment-staging.yaml -n otel-staging | ||
} | ||
|
||
########################################################################################################### | ||
|
||
aws eks --region "${region}" update-kubeconfig --name "${clusterName}" | ||
kubectl config use-context "${clusterArn}" | ||
|
||
install_reinvent_demos |
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,14 @@ | ||
# Unless explicitly stated otherwise all files in this repository are licensed | ||
# under the Apache 2.0 License. | ||
# | ||
FROM golang:1.21 | ||
|
||
WORKDIR /app | ||
COPY ./src/go_server_dd go_server_dd/ | ||
|
||
WORKDIR /app/go_server_dd | ||
RUN go mod download | ||
|
||
RUN go build -o /go_server_dd | ||
|
||
CMD [ "/go_server_dd" ] |
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,80 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: opentelemetry-demo-go-server-dd | ||
labels: | ||
app.kubernetes.io/component: go-server-dd | ||
app.kubernetes.io/instance: opentelemetry-demo | ||
app.kubernetes.io/name: opentelemetry-demo-go-server-dd | ||
app.kubernetes.io/part-of: opentelemetry-demo | ||
app.kubernetes.io/version: "1.4.0" | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 10 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: opentelemetry-demo-go-server-dd | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: go-server-dd | ||
app.kubernetes.io/instance: opentelemetry-demo | ||
app.kubernetes.io/name: opentelemetry-demo-go-server-dd | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: alpha.eksctl.io/nodegroup-name | ||
operator: In | ||
values: | ||
- ng-4 | ||
containers: | ||
- name: go-server-dd | ||
image: 601427279990.dkr.ecr.us-east-1.amazonaws.com/otel-demo:PLACEHOLDER_COMMIT_SHA-go-server-dd | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 8082 | ||
name: ddgoserverport | ||
protocol: TCP | ||
env: | ||
- name: DD_SERVICE | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: "metadata.labels['app.kubernetes.io/component']" | ||
- name: DD_ENV | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.namespace | ||
- name: DD_TRACE_AGENT_URL | ||
value: unix:///var/run/datadog/apm.socket | ||
volumeMounts: | ||
- name: apmsocketpath | ||
mountPath: /var/run/datadog | ||
resources: | ||
limits: | ||
memory: 1Gi | ||
securityContext: | ||
runAsGroup: 1000 | ||
runAsNonRoot: true | ||
runAsUser: 1000 | ||
volumes: | ||
- hostPath: | ||
path: /var/run/datadog/ | ||
name: apmsocketpath | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: opentelemetry-demo-go-server-dd | ||
spec: | ||
selector: | ||
app.kubernetes.io/name: opentelemetry-demo-go-server-dd | ||
ports: | ||
- name: go-server-dd | ||
port: 8082 | ||
protocol: TCP | ||
targetPort: 8082 |
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,44 @@ | ||
module go_server_dd | ||
|
||
go 1.21.4 | ||
|
||
require ( | ||
github.com/sirupsen/logrus v1.9.3 | ||
go.opentelemetry.io/otel v1.20.0 | ||
gopkg.in/DataDog/dd-trace-go.v1 v1.58.0 | ||
) | ||
|
||
require ( | ||
github.com/DataDog/appsec-internal-go v1.0.2 // indirect | ||
github.com/DataDog/datadog-agent/pkg/obfuscate v0.48.0 // indirect | ||
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.48.1 // indirect | ||
github.com/DataDog/datadog-go/v5 v5.3.0 // indirect | ||
github.com/DataDog/go-libddwaf/v2 v2.1.0 // indirect | ||
github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect | ||
github.com/DataDog/sketches-go v1.4.2 // indirect | ||
github.com/Microsoft/go-winio v0.6.1 // indirect | ||
github.com/cespare/xxhash/v2 v2.2.0 // indirect | ||
github.com/dustin/go-humanize v1.0.1 // indirect | ||
github.com/ebitengine/purego v0.5.0 // indirect | ||
github.com/go-logr/logr v1.3.0 // indirect | ||
github.com/go-logr/stdr v1.2.2 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/google/uuid v1.3.1 // indirect | ||
github.com/outcaste-io/ristretto v0.2.3 // indirect | ||
github.com/philhofer/fwd v1.1.2 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect | ||
github.com/tinylib/msgp v1.1.8 // indirect | ||
go.opentelemetry.io/otel/metric v1.20.0 // indirect | ||
go.opentelemetry.io/otel/trace v1.20.0 // indirect | ||
go.uber.org/atomic v1.11.0 // indirect | ||
go4.org/intern v0.0.0-20230525184215-6c62f75575cb // indirect | ||
go4.org/unsafe/assume-no-moving-gc v0.0.0-20230525183740-e7c30c78aeb2 // indirect | ||
golang.org/x/mod v0.12.0 // indirect | ||
golang.org/x/sys v0.14.0 // indirect | ||
golang.org/x/time v0.3.0 // indirect | ||
golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect | ||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect | ||
google.golang.org/protobuf v1.30.0 // indirect | ||
inet.af/netaddr v0.0.0-20230525184311-b8eac61e914a // indirect | ||
) |
Oops, something went wrong.