-
Notifications
You must be signed in to change notification settings - Fork 13
ful_SC-22363_add_otel_logs #696
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
Open
fulyauluturk
wants to merge
20
commits into
master
Choose a base branch
from
ful_otel_logs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
15d5cbb
Update mkdocs.yml
fulyauluturk f8f076f
Create opentelemetry-logs-integration.md
fulyauluturk 4b3392b
Add files via upload
fulyauluturk 6a51d27
Update opentelemetry-logs-integration.md
fulyauluturk 639f9a7
Update opentelemetry-logs-integration.md
fulyauluturk 48e6bb1
Add files via upload
fulyauluturk b89dad8
Update opentelemetry-logs-integration.md
fulyauluturk 94d28da
Update opentelemetry-logs-integration.md
fulyauluturk b3ecb0d
Delete docs/integration/opentelemetry-logs-integration.md
fulyauluturk fe74881
Add files via upload
fulyauluturk e6f0b9c
Update opentelemetry-integration.md
fulyauluturk 91e7825
Update opentelemetry-integration.md
fulyauluturk 791a00d
Update opentelemetry-integration.md
fulyauluturk d41b9ad
Update mkdocs.yml
fulyauluturk 2d89305
Update opentelemetry-integration.md
fulyauluturk fade62c
Update opentelemetry-integration.md
fulyauluturk f22f95a
Update opentelemetry-integration.md
fulyauluturk b958cad
Update opentelemetry-integration.md
fulyauluturk d3bf856
Update opentelemetry-integration.md
fulyauluturk 5b99934
Update mkdocs.yml
fulyauluturk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| Title: OpenTelemetry Logs | ||
| Description: Complete guide for integrating OpenTelemetry logging with Sematext Cloud. Learn how to set up the Sematext Agent as an OpenTelemetry collector, configure SDK-specific logging for Python, Go, Node.js, .NET, Java, Ruby, and PHP applications, explore built-in reports and visualizations, pre-defined alert rules. | ||
|
|
||
| OpenTelemetry is an observability framework that helps you collect data from your applications and servers. It can gather logs, metrics, and traces in one place. Sematext Cloud works with OpenTelemetry to store and display this data. | ||
|
|
||
| This page explains how to integrate OpenTelemetry logs in your application and how to use the [Sematext Agent](/docs/agents/sematext-agent) to ship logs from the application that's been instrumented with OpenTelemetry to Sematext Cloud. Support for OpenTelemetry metrics and traces will be added soon. Once available, you will be able to correlate logs, metrics, and traces together in Sematext Cloud. | ||
|
|
||
| For now, you can start shipping logs. With logs you can monitor your applications and infrastructure, troubleshoot issues faster, detect anomalies, and connect logs to [events](/docs/events) such as deployments or restarts. Later, when metrics and tracing support is added, you will be able to see the full picture: metrics for system performance, traces for request flows, and logs for detailed context, all in one place. Features like [Split Screen](/docs/guide/split-screen) and [Connected Apps](/docs/guide/connected-apps) in Sematext Cloud will let you view and correlate this data side by side. | ||
|
|
||
| ## Create OpenTelemetry Logs App & Install Sematext Agent | ||
|
|
||
| - Create an OpenTelemetry [Logs App](/docs/guide/app-guide). This App is where your logs will be stored and analyzed. | ||
| - Install the [Sematext Agent](/docs/agents/sematext-agent/releasenotes) using the instructions shown in the App creation flow. The Agent works as an OpenTelemetry collector and ships logs from your application that has been instrumented with an OpenTelemetry SDKs to Sematext Cloud. | ||
| - Set up log exporting in your application. After installing the Agent, follow the SDK-specific instructions provided in the UI. Choose your language and integrate OpenTelemetry logging into your code. | ||
|
|
||
| > OpenTelemetry logging is supported in `Python`, `Go`, `Node.js`, `.NET`, `Java`, `Ruby`, and `PHP`. The SDK setup instructions for these languages are shown after you create an OpenTelemetry Logs App and install the Sematext Agent. | ||
|
|
||
| ## Logs | ||
|
|
||
| ### Standard Info Added Automatically | ||
|
|
||
| After following the SDK-specific instructions, your logs will automatically have useful metadata in every log. | ||
|
|
||
| Common fields include: | ||
|
|
||
| - `service.name` - Your applications's name | ||
| - `service.version` - Your applications's version | ||
| - `deployment.environment` - Where it's running (dev, prod, etc.) | ||
| - `os.host` - Server name | ||
| - `container.name` - Docker container name | ||
| - `trace.id` and `span.id` - Identifiers that connect a log entry with a specific trace or span. These fields are useful because they allow you to start from a trace or span and then find the related logs to see detailed context about what happened during that request. | ||
|
|
||
| Once data is in, you can explore it via the built-in reports: | ||
|
|
||
| ### Overview Report | ||
|
|
||
| Overview report provides a view of your system's state/status/health with visual analytics including total log counts, severity distribution (info, warning, error, debug, trace), SDK breakdown, service-by-service activity monitoring, host distribution analysis, and timeline visualizations showing activity patterns over time. You can drill down from these visualizations to investigate issues and understand how your system behaves across services and environments. | ||
|
|
||
|  | ||
|
|
||
| ### Explore Report | ||
|
|
||
|  | ||
|
|
||
| Explore report lets you see raw logs in the Logs Table. Here you can use [Quick Actions](/docs/logs/logs-table-quick-actions/) such as creating alerts, adding logs to dashboards, or applying filters. You can save common queries as [Saved Views](/docs/guide/saved-views/) for faster access later. You can also correlate logs with Events such as deployments, scaling actions, or configuration changes to understand when and why issues started. This makes troubleshooting faster because you can connect changes in your system directly with the log activity they caused. | ||
|
|
||
| ## Default Alert Rules | ||
|
|
||
| Moreover, the pre-configured [alert rules](/docs/guide/alerts-guide) will notify you about: | ||
|
|
||
| - **Anomaly alerts**: Alerts when there are abnormal spikes in error and warning logs | ||
| - **Service Heartbeat Alert**: Alerts when a service stops sending logs for an extended period, indicating the service may have crashed, been terminated, or lost connectivity. | ||
| - **Infrastructure Resource Exhaustion Alert**: Alerts on critical resource exhaustion events by detecting keywords indicating system limits have been reached. Triggers immediately on memory, disk, or connection pool depletion to enable rapid intervention before complete service failure. | ||
| - **Authentication Attack Detection Alert**: Alerts on potential brute force or credential stuffing attacks by monitoring failed authentication attempts. | ||
| - **Database Connectivity Issues**: Alerts on database connection problems and query failures that could indicate database server issues, network problems, or connection pool exhaustion. Early detection prevents cascading application failures when database connectivity is degraded. | ||
|
|
||
| # Event Correlation | ||
|
|
||
| Sending [events](/docs/events/) to Sematext Cloud alongside your OpenTelemetry logs helps you understand the context behind changes in your system. Events can include deployments, service restarts, configuration changes, scaling actions, or other operational milestones. By correlating these events with logs, you can quickly identify the root cause of issues and see how system activity aligns with key changes. | ||
|
|
||
| We recommend using the [Sematext API](/docs/events/adding/) to send events whenever these operational changes occur. Include key metadata such as environment and version. | ||
|
|
||
| This enables you to: | ||
| - Quickly determine if a spike in error logs corresponds with a recent deployment or configuration change. | ||
| - Investigate issues by checking whether log patterns align with operational events. | ||
| - Understand trends in your system by visualizing event-driven log activity over time. | ||
|
|
||
| For example, if an error surge happens after a new release, the event log helps you immediately pinpoint the deployment responsible, reducing troubleshooting time and helping maintain system reliability. | ||
|
|
||
| Once your events are in Sematext Cloud, you can view them by toggling on the Events heatbar in your OpenTelemetry Logs App’s Explore report. Hovering over the heatbar shows the number of events that occurred within a specific timeframe. Clicking on a section opens a flyout where you can see detailed event information and directly correlate with your logs. | ||
|
|
||
| The recording below shows how events can help when you receive an anomaly alert about a sudden spike in errors in your logs. | ||
| - Filter for errors in your OpenTelemetry Logs App | ||
| - Toggle on the Events heatmap to see recent changes | ||
| - Notice two new events in the last few minutes | ||
| - Open the details and see a deployment that likely caused the spike | ||
|
|
||
|  | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| If you have trouble sending logs, try out the latest version of [Sematext Agent](/docs/agents/sematext-agent/installation/). Also, make sure Sematext Agent is configured to send logs to your OpenTelemetry Logs App. Lastly, check the [Log Agents panel](/docs/fleet/#log-agents) panel for any errors, and refer to our [Sematext Logs FAQ](/docs/logs/faq/) for useful tips. | ||
|
|
||
| For more troubleshooting information please look at [Troubleshooting](/docs/logs/faq/#troubleshooting) section. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.