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

Update samples #108

Merged
merged 12 commits into from
Nov 14, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ listed above.
Install the the Operator with:

```
kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/download/v0.89.0/opentelemetry-operator.yaml
kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/download/v0.112.0/opentelemetry-operator.yaml
```

### Starting the Collector
Expand Down
8 changes: 5 additions & 3 deletions collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: opentelemetry.io/v1alpha1

Check warning on line 15 in collector-config.yaml

View workflow job for this annotation

GitHub Actions / yamllint

15:1 [document-start] missing document start "---"
kind: OpenTelemetryCollector
metadata:
name: otel
Expand All @@ -22,16 +22,18 @@
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:

exporters:
logging:
loglevel: debug
debug:
verbosity: detailed

service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [logging]
exporters: [debug]
2 changes: 1 addition & 1 deletion recipes/beyla-golden-signals/gce/install-beyla.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sudo apt install -y openjdk-17-jdk

# Download Beyla
echo "Downloading Beyla..."
BEYLA_V1_7_RELEASE=https://github.com/grafana/beyla/releases/download/v1.7.0/beyla-linux-amd64-v1.7.0.tar.gz
BEYLA_V1_7_RELEASE=https://github.com/grafana/beyla/releases/download/v1.8.6/beyla-linux-amd64-v1.8.6.tar.gz
curl -Lo beyla.tar.gz $BEYLA_V1_7_RELEASE
mkdir -p beyla-installation/
tar -xzf beyla.tar.gz -C beyla-installation/
Expand Down
10 changes: 8 additions & 2 deletions recipes/beyla-golden-signals/gke/beyla-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
hostPID: true
initContainers:
- name: mount-bpf-fs
image: grafana/beyla:1.6.2
image: grafana/beyla:1.8.6
args:
# Create the directory using the Pod UID, and mount the BPF filesystem.
- 'mkdir -p /sys/fs/bpf/$BEYLA_BPF_FS_PATH && mount -t bpf bpf /sys/fs/bpf/$BEYLA_BPF_FS_PATH'
Expand Down Expand Up @@ -64,7 +64,7 @@ spec:
requests:
cpu: 10m
memory: 100Mi
image: grafana/beyla:1.5.2
image: grafana/beyla:1.8.6
securityContext:
seccompProfile:
type: RuntimeDefault
Expand Down Expand Up @@ -122,5 +122,11 @@ data:
attributes:
kubernetes:
enable: true
# drop_external only collects golden signal metrics for kubernetes entities (e.g. pods), which reduces resource usage.
drop_external: true
dashpole marked this conversation as resolved.
Show resolved Hide resolved
dashpole marked this conversation as resolved.
Show resolved Hide resolved
# disable_informers prevents Beyla from watching k8s resources, and reduces the load on the kubernetes API Server.
disable_informers: [replicaset, service, node]
dashpole marked this conversation as resolved.
Show resolved Hide resolved
routes:
unmatched: wildcard
ebpf:
bpf_fs_base_dir: /sys/fs/bpf
24 changes: 5 additions & 19 deletions recipes/beyla-golden-signals/gke/collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,27 @@ kind: OpenTelemetryCollector
metadata:
name: otel
spec:
image: otel/opentelemetry-collector-contrib:0.90.0
image: otel/opentelemetry-collector-contrib:0.112.0
config: |
receivers:
# receive OTLP metrics from Beyla
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
# detect gke resource attributes
resourcedetection:
detectors: [env, gcp]
timeout: 2s
override: false
# Filter out metrics that aren't relevant about pods
filter:
metrics:
metric:
# not about pods
- resource.attributes["k8s.pod.name"] == nil
# not relevant to the GKE applications dashboard. You can comment the line below to
# pass through all metrics generated by Beyla
- name != "http.server.request.duration" and name != "rpc.server.duration"
datapoint:
# Some gRPC metrics appear not to have an RPC method.
- metric.name == "rpc.server.duration" and attributes["rpc.method"] == ""
# Some HTTP metrics appear not to have an http method.
- metric.name == "http.server.request.duration" and attributes["http.request.method"] == ""
exporters:
googlemanagedprometheus:
logging:
loglevel: debug
service:
pipelines:
metrics:
receivers: [otlp]
processors: [filter, resourcedetection]
exporters: [logging, googlemanagedprometheus]
processors: [resourcedetection]
exporters: [googlemanagedprometheus]
14 changes: 10 additions & 4 deletions recipes/beyla-service-graph/beyla-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
hostPID: true
initContainers:
- name: mount-bpf-fs
image: grafana/beyla:1.6.2
image: grafana/beyla:1.8.6
args:
# Create the directory using the Pod UID, and mount the BPF filesystem.
- 'mkdir -p /sys/fs/bpf/$BEYLA_BPF_FS_PATH && mount -t bpf bpf /sys/fs/bpf/$BEYLA_BPF_FS_PATH'
Expand Down Expand Up @@ -64,7 +64,7 @@ spec:
requests:
cpu: 10m
memory: 100Mi
image: grafana/beyla:1.5.2
image: grafana/beyla:1.8.6
securityContext:
seccompProfile:
type: RuntimeDefault
Expand Down Expand Up @@ -121,10 +121,16 @@ data:
otel_traces_export:
endpoint: http://otel-collector:4317
interval: 30s
# Kubernetes decoration must be enabled to use k8s_pod_name service discovery
# https://github.com/grafana/beyla/issues/673
attributes:
instance_id:
dns: false
kubernetes:
enable: true
# drop_external only collects spans for kubernetes entities (e.g. pods), which reduces resource usage.
drop_external: true
dashpole marked this conversation as resolved.
Show resolved Hide resolved
dashpole marked this conversation as resolved.
Show resolved Hide resolved
# disable_informers prevents Beyla from watching k8s resources, and reduces the load on the kubernetes API Server.
disable_informers: [replicaset, service, node]
dashpole marked this conversation as resolved.
Show resolved Hide resolved
routes:
unmatched: wildcard
ebpf:
bpf_fs_base_dir: /sys/fs/bpf
8 changes: 4 additions & 4 deletions recipes/beyla-service-graph/collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ kind: OpenTelemetryCollector
metadata:
name: otel
spec:
image: otel/opentelemetry-collector-contrib:0.90.0
image: otel/opentelemetry-collector-contrib:0.112.0
config: |
receivers:
# receive OTLP spans from Beyla
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
connectors:
# convert spans into a calls metric
spanmetrics/servicegraph:
Expand Down Expand Up @@ -98,7 +100,7 @@ spec:
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/servicegraphconnector#how-it-works
- context: metric
statements:
- set(name, "traces_service_graph_request") where name == "calls"
- set(name, "traces_service_graph_request") where name == "traces.span.metrics.calls"
resource/podinstance:
attributes:
- key: pod
Expand All @@ -114,8 +116,6 @@ spec:
- regex: 'pod'
- regex: client
- regex: server
logging:
loglevel: debug
service:
pipelines:
traces:
Expand Down
10 changes: 6 additions & 4 deletions recipes/cloud-trace/collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,30 @@
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: opentelemetry.io/v1alpha1

Check warning on line 15 in recipes/cloud-trace/collector-config.yaml

View workflow job for this annotation

GitHub Actions / yamllint

15:1 [document-start] missing document start "---"
kind: OpenTelemetryCollector
metadata:
name: otel
spec:
image: otel/opentelemetry-collector-contrib:0.90.0
image: otel/opentelemetry-collector-contrib:0.112.0
config: |
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:

exporters:
googlecloud:
logging:
loglevel: debug
debug:
verbosity: detailed

service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [logging, googlecloud]
exporters: [debug, googlecloud]
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: opentelemetry.io/v1alpha1

Check warning on line 15 in recipes/daemonset-and-deployment/daemonset-collector-config.yaml

View workflow job for this annotation

GitHub Actions / yamllint

15:1 [document-start] missing document start "---"
kind: OpenTelemetryCollector
metadata:
name: otel
spec:
image: otel/opentelemetry-collector-contrib:0.90.0
image: otel/opentelemetry-collector-contrib:0.112.0
mode: daemonset
resources:
requests:
Expand All @@ -30,7 +30,9 @@
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
memory_limiter:
check_interval: 1s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: opentelemetry.io/v1alpha1

Check warning on line 15 in recipes/daemonset-and-deployment/deployment-collector-config.yaml

View workflow job for this annotation

GitHub Actions / yamllint

15:1 [document-start] missing document start "---"
kind: OpenTelemetryCollector
metadata:
name: otel-deployment
spec:
image: otel/opentelemetry-collector-contrib:0.90.0
image: otel/opentelemetry-collector-contrib:0.112.0
resources:
requests:
cpu: 50m
Expand All @@ -36,7 +36,9 @@
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
extensions:
file_storage:
directory: /var/lib/buffered-telemetry
Expand Down
4 changes: 2 additions & 2 deletions recipes/host-and-kubelet-metrics/collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ kind: OpenTelemetryCollector
metadata:
name: otel
spec:
image: otel/opentelemetry-collector-contrib:0.98.0
image: otel/opentelemetry-collector-contrib:0.112.0
mode: daemonset
env:
- name: K8S_NODE_NAME
Expand Down Expand Up @@ -105,7 +105,7 @@ spec:
extra_metrics_config:
enable_target_info: false
resource_filters:
regex: "k8s.*"
- regex: "k8s.*"

service:
pipelines:
Expand Down
10 changes: 6 additions & 4 deletions recipes/resource-detection/collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: opentelemetry.io/v1alpha1

Check warning on line 15 in recipes/resource-detection/collector-config.yaml

View workflow job for this annotation

GitHub Actions / yamllint

15:1 [document-start] missing document start "---"
kind: OpenTelemetryCollector
metadata:
name: otel
spec:
image: otel/opentelemetry-collector-contrib:0.90.0
image: otel/opentelemetry-collector-contrib:0.112.0
config: |
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

processors:
resourcedetection:
Expand All @@ -32,12 +34,12 @@
override: false

exporters:
logging:
loglevel: debug
debug:
verbosity: detailed

service:
pipelines:
traces:
receivers: [otlp]
processors: [resourcedetection]
exporters: [logging]
exporters: [debug]
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ kind: OpenTelemetryCollector
metadata:
name: otel
spec:
image: otel/opentelemetry-collector-contrib:0.90.0
image: otel/opentelemetry-collector-contrib:0.112.0
config: |
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

processors:
resourcedetection:
Expand All @@ -40,12 +42,12 @@ spec:
action: extract

exporters:
logging:
loglevel: debug
debug:
verbosity: detailed

service:
pipelines:
traces:
receivers: [otlp]
processors: [resourcedetection,attributes]
exporters: [logging]
processors: [resourcedetection,resource]
exporters: [debug]
10 changes: 6 additions & 4 deletions recipes/trace-enhancements/collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ kind: OpenTelemetryCollector
metadata:
name: otel
spec:
image: otel/opentelemetry-collector-contrib:0.90.0
image: otel/opentelemetry-collector-contrib:0.112.0
config: |
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

processors:
attributes:
Expand All @@ -33,12 +35,12 @@ spec:
action: insert

exporters:
logging:
loglevel: debug
debug:
verbosity: detailed

service:
pipelines:
traces:
receivers: [otlp]
processors: [attributes]
exporters: [logging]
exporters: [debug]
Loading
Loading