Skip to content

Commit 473e7e2

Browse files
committed
STAC-22297 Updated documents to match the deployment on sandbox and saas-tooling prod clusters.
1 parent 3a391a1 commit 473e7e2

4 files changed

Lines changed: 130 additions & 3 deletions

File tree

.gitbook/assets/otel/aws_nodejs_otel_proxy_collector_configuration.svg

Lines changed: 16 additions & 0 deletions
Loading

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
## 🔭 Open Telemetry
9494
* [Getting started](setup/otel/getting-started.md)
9595
* [Open telemetry collector](setup/otel/collector.md)
96+
* [Collector as a proxy](setup/otel/proxy-collector.md)
9697
* [Languages](setup/otel/languages/README.md)
9798
* [Generic Exporter configuration](setup/otel/languages/sdk-exporter-config.md)
9899
* [Java](setup/otel/languages/java.md)

setup/otel/languages/node.js/auto-instrumentation-of-lambdas.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,23 @@ service:
8989
processors: []
9090
```
9191
92-
Be aware this collector is used to send the data over to a next collector which then is used for tail sampling, metric aggregation, etc. before sending data over to SUSE Observability. This second collector also needs to run in the customers environment. See this page for [instructions](../../collector.md).
92+
Be aware this collector is used to send the data over to a next collector which then is used for tail sampling, metric aggregation, etc. before sending data over to SUSE Observability. This second collector also needs to run in the customer's environment.
93+
94+
Depending on the desired functionality, or based upon factors such as volumes of data being generated by lambdas instrumented in this way, collectors can be set up for batching, tail-sampling, and other pre-processing techniques to reduce the impact on SUSE Observability.
95+
96+
See this page for [guidance and instruction](../../proxy-collector.md) on how to set up a batching collector that acts as a security proxy for SUSE Observability.
97+
See this page for [instructions](../../collector.md) on how to set up a collector that does tail-sampling as well.
98+
For more information about processor configuration on the opentelemetry collector, see the [official documentation](https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/README.md).
9399
94100
![AWS Lambda Instrumentation With Opentelemetry](/.gitbook/assets/otel/aws_nodejs_otel_auto_instrumentation.svg)
95101
96102
## Package.json
97103
98104
Make sure to add `"@opentelemetry/auto-instrumentations-node": "^0.55.2",` to `package.json` and execute `npm install` to add the auto-instrumentation client libraries to your NodeJS Lambda.
99105

100-
## Troubleshooting Timeouts
106+
## Troubleshooting
107+
108+
### Timeouts
101109

102110
If the addition of the OTEL Lambda layers results in lambdas that time out (checking the logs might indicate that the collector was asked to shut down while still busy, e.g. seeing the following log entry):
103111

@@ -141,12 +149,19 @@ Note the memory increment is 128MB
141149

142150
Note Timeout is an integer value denoting seconds.
143151

152+
### Authentication and Source IP Filtering
153+
154+
If you encounter `error 403 Unauthorized` when submitting collector data to your cluster, or to any pre-processing or proxy collector, double-check the source IP address of the VPC NAT gateway matches what is whitelisted by the collector ingress,
155+
also double check that the chosen authentication mechanism matches source and destination, and also that credentials (secrets, etc.) are set up correctly.
156+
157+
For more information about configuring authentication for the opentelemetry collector, please refer to the [official documentation](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configauth/README.md).
158+
144159
## References
145160

146161
Auto-instrumentation docs → [https://opentelemetry.io/docs/faas/lambda-auto-instrument/](https://opentelemetry.io/docs/faas/lambda-auto-instrument/)
147162

148163
Collector docs → [https://opentelemetry.io/docs/faas/lambda-collector/](https://opentelemetry.io/docs/faas/lambda-collector/)
149164

150-
Github Releases Page for finding latest ARNs → [https://github.com/open-telemetry/opentelemetry-lambda/releases](https://github.com/open-telemetry/opentelemetry-lambda/releases)
165+
GitHub Releases Page for finding latest ARNs → [https://github.com/open-telemetry/opentelemetry-lambda/releases](https://github.com/open-telemetry/opentelemetry-lambda/releases)
151166

152167
OTLP Exporter Configuration → [https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/)

setup/otel/proxy-collector.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
description: SUSE Observability
3+
---
4+
5+
# Open Telemetry Collector as a proxy
6+
7+
The normal configuration of the Opentelemetry Collector for tail-sampling traces can be found [here](collector.md)
8+
9+
The below configuration describes a deployment that only does batching, and no further processing of traces, metrics,
10+
or logs. It is meant as a security proxy that exists outside the SUSE Observability cluster, but within trusted network
11+
infrastructure. Security credentials for the proxy and SUSE Observability can be set up separately, adding a layer of
12+
authentication that does not reside with the caller, but with the host.
13+
14+
![AWS Lambda Instrumentation With Opentelemetry via proxy collector](/.gitbook/assets/otel/aws_nodejs_otel_proxy_collector_configuration.svg)
15+
16+
{% code title="otel-collector.yaml" lineNumbers="true" %}
17+
```yaml
18+
mode: deployment
19+
presets:
20+
kubernetesAttributes:
21+
enabled: true
22+
# You can also configure the preset to add all the associated pod's labels and annotations to you telemetry.
23+
# The label/annotation name will become the resource attribute's key.
24+
extractAllPodLabels: true
25+
extraEnvsFrom:
26+
- secretRef:
27+
name: open-telemetry-collector
28+
image:
29+
# Temporary override for image tag, the helm chart has not been released yet
30+
tag: 0.97.0
31+
32+
config:
33+
receivers:
34+
otlp:
35+
protocols:
36+
grpc:
37+
endpoint: 0.0.0.0:4317
38+
http:
39+
endpoint: 0.0.0.0:4318
40+
41+
exporters:
42+
# Exporter for traces to traffic mirror (used by the common config)
43+
otlp:
44+
endpoint: <url for opentelemetry ingestion by suse observability>
45+
auth:
46+
authenticator: bearertokenauth
47+
48+
extensions:
49+
bearertokenauth:
50+
scheme: SUSEObservability
51+
token: "${env:API_KEY}"
52+
53+
service:
54+
extensions: [health_check, bearertokenauth]
55+
pipelines:
56+
traces:
57+
receivers: [otlp]
58+
processors: [batch]
59+
exporters: [otlp]
60+
metrics:
61+
receivers: [otlp]
62+
processors: [batch]
63+
exporters: [otlp]
64+
logs:
65+
receivers: [otlp]
66+
processors: [batch]
67+
exporters: [otlp]
68+
69+
ingress:
70+
enabled: true
71+
annotations:
72+
kubernetes.io/ingress.class: ingress-nginx-external
73+
nginx.ingress.kubernetes.io/ingress.class: ingress-nginx-external
74+
nginx.ingress.kubernetes.io/backend-protocol: GRPC
75+
# "12.34.56.78/32" IP address of NatGateway in the VPC where the otel data is originating from
76+
# nginx.ingress.kubernetes.io/whitelist-source-range: "12.34.56.78/32"
77+
hosts:
78+
- host: "otlp-collector-proxy.${CLUSTER_NAME}"
79+
paths:
80+
- path: /
81+
pathType: ImplementationSpecific
82+
port: 4317
83+
tls:
84+
- secretName: ${CLUSTER_NODOT}-ecc-tls
85+
hosts:
86+
- "otlp-collector-proxy.${CLUSTER_NAME}"
87+
```
88+
{% endcode %}
89+
90+
91+
### Ingress Source Range Whitelisting
92+
93+
To emphasize the role of the proxy collector as a security measure, it is recommended to use a source-range whitelist
94+
to filter out data from untrusted and/or unknown sources. In contrast, the SUSE Observability ingestion collector may
95+
have to accept data from multiple sources, maintaining a whitelist on that level does not scale well.

0 commit comments

Comments
 (0)