Skip to content

Commit

Permalink
Follow semantic conventions for OpenTelemetry instruments.
Browse files Browse the repository at this point in the history
This also uses GlobalOpenTelemetry to reuse the OpenTelemetry instance created by the Java agent.
  • Loading branch information
SanjayVas committed May 24, 2024
1 parent 32628f1 commit 45e369e
Show file tree
Hide file tree
Showing 38 changed files with 579 additions and 1,515 deletions.
12 changes: 1 addition & 11 deletions .github/actions/configure-metrics-aws/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,7 @@ inputs:
runs:
using: composite
steps:
- name: Install cert-manager
shell: bash
run: |
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.yaml
kubectl rollout status deployment cert-manager-webhook --namespace=cert-manager --timeout=5m
- name: Install OpenTelemetry operator
shell: bash
run: |
kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/download/v0.88.0/opentelemetry-operator.yaml
kubectl rollout status deployment opentelemetry-operator-controller-manager --namespace=opentelemetry-operator-system --timeout=5m
- uses: ./.github/actions/install-otel-operator

- name: Generate configurations
shell: bash
Expand Down
21 changes: 5 additions & 16 deletions .github/actions/configure-metrics/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,16 @@ description: |
runs:
using: composite
steps:
- name: Install cert-manager
shell: bash
run: |
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.yaml
kubectl rollout status deployment cert-manager-webhook --namespace=cert-manager --timeout=5m
- name: Install OpenTelemetry operator
shell: bash
run: |
kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/download/v0.88.0/opentelemetry-operator.yaml
kubectl rollout status deployment opentelemetry-operator-controller-manager --namespace=opentelemetry-operator-system --timeout=5m
- uses: ./.github/actions/install-otel-operator

- name: Generate configurations
shell: bash
run: >
bazelisk build
//src/main/k8s/dev:open_telemetry_gke
//src/main/k8s/dev:prometheus_gke
run: bazelisk build //src/main/k8s/dev:open_telemetry_gke

- name: Apply configurations
shell: bash
run: |
kubectl apply -f "$BAZEL_BIN/src/main/k8s/dev/open_telemetry_gke.yaml"
kubectl apply -f "$BAZEL_BIN/src/main/k8s/dev/prometheus_gke.yaml"
# Delete old Prometheus managed collection.
kubectl delete ClusterPodMonitoring --all
39 changes: 39 additions & 0 deletions .github/actions/install-otel-operator/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2024 The Cross-Media Measurement Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Install OpenTelemetry Operator
description: |
Installs OpenTelemetry Kubernetes Operator into a cluster.
Requirements:
* `kubectl` points to cluster
runs:
using: composite
steps:
- name: Install cert-manager
shell: bash
run: |
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml
for deployment in $(kubectl --namespace=cert-manager get deployments -o name); do
kubectl --namespace=cert-manager rollout status "$deployment" --timeout=5m
done
- name: Install OpenTelemetry operator
shell: bash
run: |
kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/download/v0.99.0/opentelemetry-operator.yaml
for deployment in $(kubectl --namespace=opentelemetry-operator-system get deployments -o name); do
kubectl --namespace=opentelemetry-operator-system rollout status "$deployment" --timeout=5m
done
17 changes: 10 additions & 7 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ module(
repo_name = "wfa_measurement_system",
)

OPENTELEMETRY_JAVA_VERSION = "1.32.0"

PROJECTNESSIE_CEL_VERSION = "0.3.11"

BORINGSSL_VERSION = "0.0.0-20230215-5c22014"
Expand Down Expand Up @@ -126,7 +124,6 @@ bazel_dep(
)
bazel_dep(
name = "common-jvm",
version = "0.82.2",
repo_name = "wfa_common_jvm",
)
bazel_dep(
Expand Down Expand Up @@ -209,10 +206,6 @@ maven.install(
"com.google.crypto.tink:tink-gcpkms:1.9.0",
"com.squareup.okhttp3:okhttp:4.12.0",
"io.opentelemetry.semconv:opentelemetry-semconv:1.22.0-alpha",
"io.opentelemetry:opentelemetry-sdk:" + OPENTELEMETRY_JAVA_VERSION,
"io.opentelemetry:opentelemetry-sdk-common:" + OPENTELEMETRY_JAVA_VERSION,
"io.opentelemetry:opentelemetry-sdk-metrics:" + OPENTELEMETRY_JAVA_VERSION,
"io.opentelemetry:opentelemetry-exporter-otlp:" + OPENTELEMETRY_JAVA_VERSION,
"io.kubernetes:client-java:" + K8S_CLIENT_VERSION,
"io.kubernetes:client-java-extended:" + K8S_CLIENT_VERSION,
"joda-time:joda-time:2.10.10",
Expand Down Expand Up @@ -325,6 +318,16 @@ archive_override(
],
)

# DO_NOT_SUBMIT(world-federation-of-advertisers/common-jvm#251): Use version.
archive_override(
module_name = "common-jvm",
integrity = "sha256-qJJIjVmCOml8vd5S7YiCvzxaXcPvQcPf4HlRRPdtV0o=",
strip_prefix = "common-jvm-9f2c0f7361ce1948fe793f38c0bec48547483209",
urls = [
"https://github.com/world-federation-of-advertisers/common-jvm/archive/9f2c0f7361ce1948fe793f38c0bec48547483209.tar.gz",
],
)

# Force use of newer version of boringssl.
single_version_override(
module_name = "boringssl",
Expand Down
Loading

0 comments on commit 45e369e

Please sign in to comment.