Skip to content

Commit c4f6828

Browse files
cyrille-leclercchalin
authored andcommitted
Fix formatting
1 parent 1110126 commit c4f6828

File tree

1 file changed

+5
-2
lines changed
  • content/en/blog/2024/collecting-file-based-java-logs-with-opentelemetry

1 file changed

+5
-2
lines changed

content/en/blog/2024/collecting-file-based-java-logs-with-opentelemetry/index.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,19 @@ Verify that OTLP/JSON logs are outputted to stdout. The logs are in the
108108
OTLP/JSON format, with a JSON object per line. The log records are nested in the
109109
`resourceLogs` array.
110110

111+
<!-- prettier-ignore-start -->
112+
111113
```json
112114
{"resourceLogs":[{"resource":{"attributes":[{"key":"deployment.environment.name","value":{"stringValue":"staging"}},{"key":"service.instance.id","value":{"stringValue":"6ad88e10-238c-4fb7-bf97-38df19053366"}},{"key":"service.name","value":{"stringValue":"checkout"}},{"key":"service.namespace","value":{"stringValue":"shop"}},{"key":"service.version","value":{"stringValue":"1.1"}}]},"scopeLogs":[{"scope":{"name":"com.mycompany.checkout.CheckoutServiceServer$CheckoutServiceImpl","attributes":[]},"logRecords":[{"timeUnixNano":"1730435085776869000","observedTimeUnixNano":"1730435085776944000","severityNumber":9,"severityText":"INFO","body":{"stringValue":"Order order-12035 successfully placed"}, "attributes":[{"key":"customerId","value":{"stringValue":"customer-49"}},{"key":"thread.id","value":{"intValue":"44"}},{"key":"thread.name","value":{"stringValue":"grpc-default-executor-1"}}],"flags":1,"traceId":"42de1f0dd124e27619a9f3c10bccac1c","spanId":"270984d03e94bb8b"}]}],"schemaUrl":"https://opentelemetry.io/schemas/1.24.0"}]}
113115
```
114116

117+
<!-- prettier-ignore-end -->
118+
115119
## Configure the OpenTelemetry Collector to ingest the OTLP/JSON logs
116120

117121
![OpenTelemetry Collector OTLP/JSON pipeline](otel-collector-otlpjson-pipeline.png)
118122

119-
Source:
120-
[https://www.otelbin.io/s/69739d790cf279c203fc8efc86ad1a876a2fc01a](https://www.otelbin.io/s/69739d790cf279c203fc8efc86ad1a876a2fc01a)
123+
[View OTel Collector pipeline with <img src="https://www.otelbin.io/favicon.ico" height="20px"/> OTelBin](https://www.otelbin.io/s/69739d790cf279c203fc8efc86ad1a876a2fc01a)
121124

122125
```yaml
123126
# tested with otelcol-contrib v0.112.0

0 commit comments

Comments
 (0)