Skip to content

Commit 03d4a74

Browse files
authored
Add logs export exclude instructions (#392)
* Add logs export exclude instructions * Peer edits
1 parent bf4d52f commit 03d4a74

File tree

6 files changed

+70
-3
lines changed

6 files changed

+70
-3
lines changed

docs/reference/edot-collector/config/configure-logs-collection.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,3 +354,42 @@ service:
354354
A more detailed example about using OTTL and the transform processor can be found at the
355355
[nginx_ingress_controller_otel](https://github.com/elastic/integrations/blob/main/packages/nginx_ingress_controller_otel/docs/README.md)
356356
integration.
357+
358+
## Exclude paths from logs collection [exclude-logs-paths]
359+
360+
To exclude specific paths from logs collection, use the `exclude` field in the `logs` pipeline configuration. Exclude patterns are applied against the paths matched by include patterns. For example:
361+
362+
::::{tab-set}
363+
:::{tab-item} Standalone
364+
```yaml
365+
receivers:
366+
# Receiver for platform specific log files
367+
filelog/platformlogs:
368+
include: [/var/log/*.log]
369+
retry_on_failure:
370+
enabled: true
371+
start_at: end
372+
storage: file_storage
373+
exclude:
374+
# Paths support glob patterns
375+
- /var/log/ignore_this.log
376+
- /var/log/another_path/*
377+
```
378+
:::
379+
380+
:::{tab-item} Kubernetes
381+
```yaml
382+
mode: daemonset
383+
384+
presets:
385+
logsCollection:
386+
enabled: true
387+
config:
388+
receivers:
389+
filelog:
390+
exclude:
391+
# Paths support glob patterns
392+
- /var/log/pods/my-nodejs-app-namespace_my-nodejs-app-pod-name_*/*/*.log
393+
```
394+
:::
395+
::::

docs/reference/edot-sdks/dotnet/configuration.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,10 @@ Allows EDOT .NET to be used without the instrumentation assembly scanning featur
189189
| Configuration method | Key |
190190
|---|---|
191191
| Environment variable | `ELASTIC_OTEL_SKIP_ASSEMBLY_SCANNING` |
192-
| `IConfiguration` integration | `Elastic:OpenTelemetry:SkipInstrumentationAssemblyScanning` |
192+
| `IConfiguration` integration | `Elastic:OpenTelemetry:SkipInstrumentationAssemblyScanning` |
193+
194+
## Prevent logs export
195+
196+
To prevent logs from being exported, set `OTEL_LOGS_EXPORTER` to `none`. However, application logs might still be gathered and exported by the Collector through the `filelog` receiver.
197+
198+
To prevent application logs from being collected and exported by the Collector, refer to [Exclude paths from logs collection](/reference/edot-collector/config/configure-logs-collection.md#exclude-logs-paths).

docs/reference/edot-sdks/java/configuration.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,10 @@ This is common in the following scenarios:
207207

208208
One solution is to add the certificate or certificate authority to the JVM trust store, which requires modifying the JVM trust store.
209209

210-
If trust store modification is not possible or not practical, for example when troubleshooting or working with a local deployment, certificate verification can be disabled by setting `ELASTIC_OTEL_VERIFY_SERVER_CERT` to `false`. This however need to be evaluated carefully as it lowers the communication security and could allow for man-in-the-middle attacks where the data could be intercepted between the agent and the collector endpoint.
210+
If trust store modification is not possible or not practical, for example when troubleshooting or working with a local deployment, certificate verification can be disabled by setting `ELASTIC_OTEL_VERIFY_SERVER_CERT` to `false`. This however need to be evaluated carefully as it lowers the communication security and could allow for man-in-the-middle attacks where the data could be intercepted between the agent and the collector endpoint.
211+
212+
## Prevent logs export
213+
214+
To prevent logs from being exported, set `OTEL_LOGS_EXPORTER` to `none`. However, application logs might still be gathered and exported by the Collector through the `filelog` receiver.
215+
216+
To prevent application logs from being collected and exported by the Collector, refer to [Exclude paths from logs collection](/reference/edot-collector/config/configure-logs-collection.md#exclude-logs-paths).

docs/reference/edot-sdks/nodejs/configuration.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,18 @@ For Node.js usage, the following instrumentations produce telemetry using HTTP s
232232

233233
EDOT Node.js differs from current upstream OTel JS in that it *defaults `OTEL_SEMCONV_STABILITY_OPT_IN` to `http`*. This means that, by default, all HTTP-related telemetry from EDOT Node.js will use the newer, stable HTTP semantic conventions. (This difference from upstream is expected to be temporary, as upstream `@opentelemetry/instrumentation-http` switches to producing only stable HTTP semantic conventions after its transition period.)
234234

235-
236235
### `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` details [otel_instrumentation_genai_capture_message_content-details]
237236

238237
Set `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` to `true` to
239238
enable capture of content data, such as prompt and completion content, in GenAI telemetry. Currently this applies to the [`@elastic/opentelemetry-instrumentation-openai` instrumentation for the OpenAI Node.js client](https://github.com/elastic/elastic-otel-node/tree/main/packages/instrumentation-openai/#configuration) that is included in EDOT Node.js
240239

241240
The `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` boolean environment variable is a convention established by the OpenTelemetry GenAI SIG. It is referenced in <https://opentelemetry.io/blog/2024/otel-generative-ai/>.
242241

242+
### ``OTEL_LOGS_EXPORTER` details [otel_logs_exporter-details]
243+
244+
To prevent logs from being exported, set `OTEL_LOGS_EXPORTER` to `none`. However, application logs might still be gathered and exported by the Collector through the `filelog` receiver.
245+
246+
To prevent application logs from being collected and exported by the Collector, refer to [Exclude paths from logs collection](/reference/edot-collector/config/configure-logs-collection.md#exclude-logs-paths).
243247

244248
[otel-sdk-envvars]: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration
245249
[otel-sdk-envvars-bsp]: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#batch-span-processor

docs/reference/edot-sdks/php/configuration.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,8 @@ The following settings control Central configuration management through OpAMP.
140140
| ELASTIC_OTEL_OPAMP_SEND_MAX_RETRIES | 3 | Integer ≥ 0 | Maximum number of retry attempts for failed message sends. |
141141
| ELASTIC_OTEL_OPAMP_SEND_RETRY_DELAY | 10s | Integer number with time duration. Optional units: ms (default), s, m. It can't be set to 0. | Time to wait between retries of failed sends. |
142142

143+
## Prevent logs export
144+
145+
To prevent logs from being exported, set `OTEL_LOGS_EXPORTER` to `none`. However, application logs might still be gathered and exported by the Collector through the `filelog` receiver.
146+
147+
To prevent application logs from being collected and exported by the Collector, refer to [Exclude paths from logs collection](/reference/edot-collector/config/configure-logs-collection.md#exclude-logs-paths).

docs/reference/edot-sdks/python/configuration.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,10 @@ LLM instrumentations implement the following configuration options:
112112
| Option | default | description |
113113
|-------------------------------------------------------|---------|:--------------------------|
114114
| `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` | `false`| If set to `true`, enables the capturing of request and response content in the log events outputted by the agent.
115+
116+
117+
## Prevent logs export
118+
119+
To prevent logs from being exported, set `OTEL_LOGS_EXPORTER` to `none`. However, application logs might still be gathered and exported by the Collector through the `filelog` receiver.
120+
121+
To prevent application logs from being collected and exported by the Collector, refer to [Exclude paths from logs collection](/reference/edot-collector/config/configure-logs-collection.md#exclude-logs-paths).

0 commit comments

Comments
 (0)