Use this page to learn the basics of Cloud Observability logs.
By the end of this page, you’ll know how to send logs to Cloud Observability and query them in the logs tab. The steps below use Vector to send sample logs to Cloud Observability, but you can use any supported integration.
Access to Cloud Observability Logging is available on request. Reach out to your Account Manager to get started.
Copy your Cloud Observability access token. You can create and find access tokens in Project settings > Access tokens.
To send logs to Cloud Observability, paste the content below in your Vector configuration file,
YOUR-ACCESS-TOKEN with your own value.
The configuration sends demo logs to Cloud Observability.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 sources: sample_logs: type: demo_logs format: apache_common lines: - line1 transforms: parse_logs: type: remap inputs: - sample_logs source: | . = parse_apache_log!(string!(.message), "common") .body = del(.message) sinks: lightstep_logs: type: elasticsearch inputs: ["parse_logs"] endpoints: ["https://logingest.lightstep.com:443"] healthcheck: enabled: false bulk: index: lightstep request: headers: "lightstep-access-token": "YOUR-ACCESS-TOKEN"
Visit Vector’s Elasticsearch sink documentation to learn more about the configuration settings. That plugin works with Cloud Observability because Cloud Observability supports much of Elasticsearch’s API.
After restarting Vector, go to Cloud Observability and click Logs. By default, Cloud Observability shows all logs written in the past hour:
To search the body attribute, click Search logs and enter observability. Cloud Observability shows the results for the selected time range.
You can also use the sidebar to filter logs by other attributes. For example, click status > 301. Cloud Observability displays status = 301 below the Search logs box and returns the relevant logs. To clear the filter, click the x next to status = 301.
You’re all set with logging basics in Cloud Observability. Visit these pages to learn more:
Updated Sep 28, 2023