Skip to content

Commit

Permalink
Merge pull request #86 from lightstep/LS-61382
Browse files Browse the repository at this point in the history
chore: Update all references to 0.103.0 and 0.24.0
  • Loading branch information
amoreena authored Jul 16, 2024
2 parents 402d6ea + d03b58d commit ed882e9
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 55 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
uses: azure/setup-helm@v3
with:
version: v3.10.0

- name: Add Helm Repos
run: |
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo add jetstack https://charts.jetstack.io
helm repo add prometheus https://prometheus-community.github.io/helm-charts
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: "3.9"
check-latest: true

- name: Set up chart-testing
Expand All @@ -45,19 +45,19 @@ jobs:
- name: Create kind cluster
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'
- name: Secret setup

- name: Secret setup
if: steps.list-changed.outputs.changed == 'true'
run: |
kubectl create namespace opentelemetry
kubectl create secret generic otel-collector-secret -n opentelemetry --from-literal=LS_TOKEN=TEST_TOKEN
- name: Dependencies
- name: Dependencies
if: steps.list-changed.outputs.changed == 'true'
run: |
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.8.0 --set installCRDs=true --wait
helm install opentelemetry-operator open-telemetry/opentelemetry-operator -n opentelemetry-operator --create-namespace --wait
helm install opentelemetry-operator open-telemetry/opentelemetry-operator -n opentelemetry-operator --create-namespace --set manager.collectorImage.repository="otel/opentelemetry-collector-contrib" --wait
- name: Run chart-testing collector-k8s (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --config ct.yaml --charts ./charts/collector-k8s --namespace opentelemetry --debug
Expand Down
54 changes: 27 additions & 27 deletions arrow/otelcolarrow-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,44 +37,44 @@ dist:
# description: My Organization telemetry collector
#
name: otelarrowcol
version: 0.20.0
version: 0.24.0
description: ServiceNow Cloud Observability OpenTelemetry Protocol with Apache Arrow gateway collector

# This indicates which version of the core collector components as
# well as the builder version. At the time of this writing, we
# recommend using at least the current release.
otelcol_version: 0.97.0
otelcol_version: 0.103.0

# We recommend building in both the OTLP exporter and the OTel-Arrow
# exporter.
exporters:
# This is the core OpenTelemetry Protocol with Apache Arrow exporter,
# recommended for exporting to ServiceNow Cloud Observability using
# either OTel-Arrow or standard OTLP over gRPC.
- gomod: github.com/open-telemetry/otel-arrow/collector v0.20.0
- gomod: github.com/open-telemetry/otel-arrow/collector v0.24.0
import: github.com/open-telemetry/otel-arrow/collector/exporter/otelarrowexporter

# The following components may be useful for debugging.

# As an alternate to the OTel-Arrow exporter, we recommend building
# with the core OTLP exporter as a fallback. These components use
# compatible configuration.
- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.97.0
- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.103.0

# In case OTLP/HTTP export is required, as opposed to the two
# gRPC options above.
- gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.97.0
- gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.103.0

# In case you want to record an OTLP telemetry session to a JSON
# file, we recommend this additional utility. See also the
# obfuscation processor, listed below. The OTel-Arrow provides
# offline tools that can help explain poor compression performance
# using inputs generated by this exporter, for example.
- gomod: github.com/open-telemetry/otel-arrow/collector v0.20.0
- gomod: github.com/open-telemetry/otel-arrow/collector v0.24.0
import: github.com/open-telemetry/otel-arrow/collector/exporter/fileexporter

# The debug exporter, useful for printing telemetry to the console.
- gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.97.0
- gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.103.0

receivers:
# The OTel-Arrow receiver supports multiple protocols including OTel-Arrow, OTLP gRPC,
Expand All @@ -84,60 +84,60 @@ receivers:
# This enables other OTel Collectors or experimental SDKs that support OTel-Arrow to
# send to this collector, such as this one for the OTel-Go Trace SDK:
# https://github.com/lightstep/otel-launcher-go/tree/main/lightstep/sdk/trace/exporters/otlp/otelcol
- gomod: github.com/open-telemetry/otel-arrow/collector v0.20.0
- gomod: github.com/open-telemetry/otel-arrow/collector v0.24.0
import: github.com/open-telemetry/otel-arrow/collector/receiver/otelarrowreceiver

# To support receiving OTLP/HTTP.
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.97.0
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.103.0

# You may wish to enable other receivers from the Collector-Contrib repository or
# elsewhere. Here are some that might be useful:
#
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.97.0
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.97.0
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.97.0
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.97.0
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.103.0
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.103.0
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.103.0
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.103.0

processors:
# We recommend use of the OTel-Arrow concurrent batch processor.
- gomod: github.com/open-telemetry/otel-arrow/collector v0.20.0
- gomod: github.com/open-telemetry/otel-arrow/collector v0.24.0
import: github.com/open-telemetry/otel-arrow/collector/processor/concurrentbatchprocessor

# We recommend building with the follow processor for obfuscation, in case you want to
# record telemetry sessions for offline analysis.
- gomod: github.com/open-telemetry/otel-arrow/collector v0.20.0
- gomod: github.com/open-telemetry/otel-arrow/collector v0.24.0
import: github.com/open-telemetry/otel-arrow/collector/processor/obfuscationprocessor

# We emphatically DO NOT recommend use of the memory limiter
# processor or the core batch processor, i.e., do not build with
# either of:
# - go.opentelemetry.io/collector/processor/memorylimiterprocessor.
# - go.opentelemetry.io/collector/processor/batchprocessor.
# - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.103.0

# These Collector-Contrib components are referred to in the charts in this package.
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.103.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.103.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.103.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.103.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor v0.103.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.103.0

# ServiceNow does not at this time recommend the probabilistic sampler processor,
# because it leads to undercounting of spans. We will update this recommendation
# when the sampler is fully supported.
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.103.0

# You may be interested in other transform components in the
# Collector-Contrib repository. Here are some that might be useful:
#
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.97.0
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.103.0

extensions:
# You may be interested in externsions from the Collector-Contrib repository. None are
# required. Here are some that might be useful:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.103.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.103.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension v0.103.0

# We do not support use of headersetterextension to apply the lightstep-access-token
# header on a per-request basis. Contact ServiceNow if you are interested in
Expand Down
6 changes: 3 additions & 3 deletions charts/collector-k8s/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ apiVersion: v2
name: otelcollector
description: Deprecated chart for using the OpenTelemetry Collector to scape static or dynamic metric targets.
type: application
version: 0.3.0
appVersion: 0.91.0
version: 0.3.1
appVersion: 0.91.1
deprecated: true
dependencies:
dependencies: []
# cert manager must be manually installed because it has CRDs
# https://github.com/kubernetes-sigs/security-profiles-operator/issues/1062
# - name: opentelemetry-operator
Expand Down
4 changes: 2 additions & 2 deletions charts/kube-otel-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: kube-otel-stack
description: Chart for sending Kubernetes metrics to Lightstep using the OpenTelemetry Operator.
type: application
version: 0.6.1
appVersion: 0.91.0
version: 0.7.0
appVersion: 0.92.0
dependencies:
# cert manager must be manually installed because it has CRDs
# https://github.com/kubernetes-sigs/security-profiles-operator/issues/1062
Expand Down
10 changes: 5 additions & 5 deletions charts/kube-otel-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ tracesCollector:
name: traces
clusterName: ""

image: otel/opentelemetry-collector-contrib:0.96.0
image: otel/opentelemetry-collector-contrib:0.103.0
mode: deployment
replicas: 1
hpa:
Expand Down Expand Up @@ -220,7 +220,7 @@ tracesCollector:
metricsCollector:
name: metrics
clusterName: ""
image: otel/opentelemetry-collector-contrib:0.96.0
image: otel/opentelemetry-collector-contrib:0.103.0
enabled: true
mode: statefulset
replicas: 3
Expand All @@ -233,7 +233,7 @@ metricsCollector:
enabled: true
allocationStrategy: "consistent-hashing"
replicas: 2
image: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:0.96.0
image: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:0.103.0
prometheusCR:
enabled: true
# Override Default targetAllocator resources
Expand Down Expand Up @@ -348,7 +348,7 @@ metricsCollector:
logsCollector:
name: logs
clusterName: ""
image: otel/opentelemetry-collector-contrib:0.96.0
image: otel/opentelemetry-collector-contrib:0.103.0
enabled: false
mode: daemonset
resources:
Expand Down Expand Up @@ -1252,7 +1252,7 @@ opAMPBridge:
addManagedLabel: false
image:
repository: ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge
tag: "0.96.0"
tag: "0.103.0"
endpoint: "wss://opamp.lightstep.com/v1/opamp"
headers:
"Authorization": "bearer ${LS_OPAMP_API_KEY}"
Expand Down
4 changes: 2 additions & 2 deletions charts/otel-cloud-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: "0.5.1"
version: "0.6.0"

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.18.0"
appVersion: "1.19.0"
10 changes: 5 additions & 5 deletions charts/otel-cloud-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ autoinstrumentation:
daemonCollector:
name: daemon
clusterName: ""
image: otel/opentelemetry-collector-contrib:0.96.0
image: otel/opentelemetry-collector-contrib:0.103.0
enabled: true
mode: daemonset
mountHostFS: true
Expand Down Expand Up @@ -305,7 +305,7 @@ daemonCollector:
clusterCollector:
name: cluster-stats
clusterName: ""
image: otel/opentelemetry-collector-contrib:0.96.0
image: otel/opentelemetry-collector-contrib:0.103.0
replicas: 1
mode: deployment
enabled: true
Expand Down Expand Up @@ -426,7 +426,7 @@ tracesCollector:
enabled: false
name: traces
clusterName: ""
image: otel/opentelemetry-collector-contrib:0.96.0
image: otel/opentelemetry-collector-contrib:0.103.0
mode: deployment
hpa:
minReplicas: 1
Expand Down Expand Up @@ -542,7 +542,7 @@ logsCollector:
enabled: false
name: logs
clusterName: ""
image: otel/opentelemetry-collector-contrib:0.96.0
image: otel/opentelemetry-collector-contrib:0.103.0
mode: daemonset
resources:
limits:
Expand Down Expand Up @@ -747,7 +747,7 @@ opAMPBridge:
addManagedLabel: false
image:
repository: ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge
tag: "0.96.0"
tag: "0.103.0"
endpoint: "wss://opamp.lightstep.com/v1/opamp"
headers:
"Authorization": "bearer ${LS_OPAMP_API_KEY}"
Expand Down
51 changes: 51 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
## recommended-collector-config

**Recommended** chart for sending Prometheus metrics without Kubernetes to ServiceNow Cloud Observability using OpenTelemetry-native metric collection and the OpenTelemetry Operator.

# Locally Testing OpenTelemetry Collector Builder

This program generates a custom OpenTelemetry Collector binary based on the example configuration.

## Requirements

- **Go Binaries** allows developers to install Go programs from the command-line, without requiring Go to be installed on your machine.

## Installation

To install the OpenTelemetry Collector builder, run:

```bash
cd ~/otel-collector-charts/arrow
GO111MODULE=on go install go.opentelemetry.io/collector/cmd/builder@latest
```

### Updating to latest version

1. Open the otelcolarrow-build.yaml file and update any references to your desired version.

2. Uncomment lines in example/config.yaml that refer to required components, such as:

```yaml
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.103.0
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.103.0
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.103.0
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.103.0
# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.103.0
```

### Usage

- Generate the custom collector binary:

```bash
builder --config ./otelcolarrow-build.yaml
```

- Run the custom collector:

```bash
./dist/otelarrowcol --config ../example/vm/config.yaml
```

#### Troubleshooting

- Note this example config does not use the concurrent batch processor. Uncomment this line instead:

` - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.103.0`
6 changes: 3 additions & 3 deletions example/vm/config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Last Collector-Contrib Validation: v0.96.0
# Last Collector-Contrib Validation: v0.103.0
receivers:
# Receivers bring data into the OpenTelemetry Collector.
# Generally, a receiver accepts data in a specified format,
Expand Down Expand Up @@ -149,7 +149,7 @@ processors:
# This is used to gather resource information from the host and is used in the resource value of telemetry data.
# For more details, see
# https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourcedetectionprocessor/README.md
detectors: [ env ]
detectors: [env]
timeout: 2s
override: false

Expand Down Expand Up @@ -254,4 +254,4 @@ service:
logs:
exporters: [debug, otlp/ls]
processors: [resourcedetection/env, attributes, batch]
receivers: [otlp] # update with your receiver name
receivers: [otlp] # update with your receiver name

0 comments on commit ed882e9

Please sign in to comment.