-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* doc: dd migration doc * chore: add migrate from dd doc to tutorial
- Loading branch information
Showing
2 changed files
with
228 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,223 @@ | ||
--- | ||
date: 2024-10-03 | ||
id: migrate-from-datadog | ||
title: Migrate From DataDog | ||
description: Migrating from DataDog to SigNoz. How to migrate metrics, traces, and logs from DataDog to SigNoz. | ||
--- | ||
|
||
SigNoz provides a unified OpenTelemetry native solution for monitoring metrics, traces, and logs, allowing for greater flexibility and control over your data. This guide will walk you through the steps to migrate your existing DataDog setup to SigNoz, covering all essential signals: metrics, traces, and logs. | ||
|
||
## Migrating Metrics | ||
|
||
Transitioning your metrics monitoring to SigNoz involves adopting the OpenTelemetry Protocol (OTLP) and configuring your systems to export metrics accordingly. | ||
|
||
### Switch to OTLP Metrics | ||
|
||
It is recommended to switch to OTLP Metrics to monitor your existing system whereever possible. Below are some of the benefits of using OTLP: | ||
|
||
**Benefits of OTLP:** | ||
|
||
- **Standardization:** OTLP is an open standard, reducing vendor lock-in and promoting interoperability. | ||
- **Data Control and Privacy:** Ensures complete ownership and security of telemetry data without third-party dependencies with help of OTel SDKs, Processors and collectors. | ||
- **Compatibility:** OTLP can be used with any OpenTelemetry-compatible vendor. 50+ observability/monitoring vendors today support OTLP. | ||
- **Ecosystem Support:** Widely adopted, ensuring compatibility with various tools and platforms. | ||
|
||
**Steps to Switch to OTLP Metrics:** | ||
|
||
1. **Configure Exporters:** | ||
- Set up OTLP exporters to send metrics data to SigNoz. | ||
- Ensure your applications are exporting metrics using the OTLP protocol. | ||
|
||
2. **Add OpenTelemetry Receivers:** | ||
- Add OTLP receivers to your OpenTelemetry Collector. There are around 100 [OpenTelemetry receivers](https://opentelemetry.io/ecosystem/registry/?s=&component=receiver&language=all) available. | ||
- Refer to this [SigNoz Guide](https://signoz.io/docs/userguide/send-metrics-cloud/) on adding an OpenTelemetry receiver to OpenTelemetry Collector. | ||
|
||
3. **Verify Data Reception:** | ||
- Check SigNoz dashboards to confirm that metrics are being received and displayed correctly. | ||
|
||
### Use Prometheus Receiver if OTLP Metrics are not supported | ||
|
||
If exporting OTLP metrics is not supported by tool, you can utilize the Prometheus receiver. | ||
|
||
**Configuration Steps:** | ||
|
||
1. **Enable Prometheus Receiver:** | ||
- Follow the guide on [Enabling a Prometheus Receiver](https://signoz.io/docs/userguide/send-metrics/#enable-a-prometheus-receiver) to configure SigNoz to accept Prometheus metrics. | ||
|
||
2. **Expose Prometheus Metrics:** | ||
- Configure your applications to expose metrics in Prometheus format. | ||
|
||
3. **Update Scrape Configurations:** | ||
- Adjust the scrape configurations in the SigNoz OpenTelemetry Collector to include your application's endpoints. | ||
|
||
### Custom Metrics: From DogStatsD to OTLP | ||
|
||
#### Replace DogStatsD with OpenTelemetry | ||
|
||
For a more integrated approach, replace DogStatsD with OpenTelemetry metrics. | ||
|
||
**Steps:** | ||
|
||
1. **Update Client Libraries:** | ||
- Replace DogStatsD client libraries with OpenTelemetry SDKs in your applications. | ||
|
||
2. **Instrument Metrics:** | ||
- Use OpenTelemetry APIs to instrument your custom metrics. | ||
|
||
**Example in Python:** | ||
|
||
```python | ||
from opentelemetry import metrics | ||
from opentelemetry.sdk.metrics import MeterProvider | ||
|
||
metrics.set_meter_provider(MeterProvider()) | ||
meter = metrics.get_meter("my_app", "0.1.2") | ||
|
||
counter = meter.create_counter( | ||
name="requests", | ||
description="Number of requests", | ||
unit="1", | ||
) | ||
|
||
# Record a metric | ||
counter.add(1, {"endpoint": "/api/v1/resource"}) | ||
``` | ||
|
||
3. **Configure Exporter:** | ||
- Set up the OTLP exporter to send metrics data to SigNoz. | ||
|
||
#### Continue to Use DogStatsD | ||
|
||
You can continue using DogStatsD for custom metrics by configuring a DataDog receiver at your OTel Agent. | ||
|
||
**Using DataDog Receiver:** | ||
- Configure the DataDog receiver in the OpenTelemetry Collector to accept DogStatsD metrics. | ||
- Refer to this [DataDog Receiver Configuration](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/datadogreceiver) for details. | ||
|
||
|
||
### Import Prebuilt SigNoz Dashboards | ||
|
||
Leverage prebuilt dashboards to visualize your metrics data effectively. | ||
|
||
**Available Dashboards:** | ||
|
||
- Host Metrics | ||
- MySQL | ||
- JVM Metrics | ||
- And more... | ||
|
||
**Steps to Import:** | ||
|
||
1. **Access the Dashboards Repository:** | ||
- Visit the SigNoz dashboards repository: [SigNoz Dashboards](https://github.com/SigNoz/dashboards). | ||
|
||
2. **Choose Dashboards:** | ||
- Select the dashboards relevant to your infrastructure and applications. | ||
|
||
3. **Import Dashboards:** | ||
- Follow the instructions provided in the repository to import dashboards into your SigNoz instance. | ||
|
||
### Handling Unsupported DataDog Integrations | ||
|
||
If certain DataDog integrations are not directly supported by SigNoz, you can utilize the DataDog receiver to bridge the gap. | ||
|
||
**Steps:** | ||
|
||
1. **Configure DataDog Receiver:** | ||
- Adjust the OpenTelemetry Collector configuration to include the DataDog receiver. | ||
- Reference: [DataDog Receiver Configuration](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/datadogreceiver) | ||
|
||
2. **Update Agents:** | ||
- Point your DataDog agents to send data to the SigNoz OpenTelemetry Collector. | ||
|
||
3. **Map Data Appropriately:** | ||
- Ensure that the data received is mapped correctly to OTLP formats. | ||
|
||
--- | ||
|
||
## Migrating Traces/APM | ||
|
||
Transitioning your tracing setup involves re-instrumenting your applications with OpenTelemetry SDKs to send trace data to SigNoz. | ||
|
||
### Switch to OpenTelemetry SDKs | ||
|
||
**Steps:** | ||
|
||
1. **Install OpenTelemetry SDKs:** | ||
- Choose the appropriate SDK for your application's language from the [SigNoz Instrumentation Guide](https://signoz.io/docs/instrumentation/). | ||
|
||
2. **Instrument Your Application:** | ||
- Use automatic or manual instrumentation to capture trace data. | ||
|
||
3. **Verify Traces in SigNoz:** | ||
- Use the SigNoz dashboard to ensure that trace data is being collected and displayed. | ||
|
||
{/* ### Try DataDog Receiver | ||
If re-instrumentation is not immediately possible, you can use the DataDog receiver to collect trace data. | ||
**Steps:** | ||
1. **Configure DataDog Receiver:** | ||
- Update the OpenTelemetry Collector configuration to include the [DataDog receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/datadogreceiver) for traces. | ||
2. **Adjust DataDog Agents:** | ||
- Point your existing DataDog agents to send trace data to the SigNoz collector. | ||
3. **Limitations:** | ||
- Note that this approach may not support all tracing features. | ||
- Re-instrumentation with OpenTelemetry is recommended for full functionality. */} | ||
|
||
--- | ||
|
||
## Migrating Logs | ||
|
||
To migrate your logging setup, you need to configure appropriate log receivers and set up parsing pipelines in SigNoz. | ||
|
||
### Use OpenTelemetry Log Receivers | ||
|
||
**Available Receivers:** | ||
|
||
- **Filelog Receiver:** For reading logs from files. | ||
- **TCP/Syslog Receiver:** For receiving logs over network protocols. | ||
- And more... | ||
|
||
**Steps:** | ||
|
||
1. **Configure Log Receivers:** | ||
- Follow the [SigNoz Log Receivers Guide](https://signoz.io/docs/userguide/logs/#log-receivers) to set up the appropriate receivers. | ||
|
||
2. **Update Log Sources:** | ||
- Ensure your applications are writing logs to locations or endpoints monitored by the receivers. | ||
|
||
### Use SigNoz Log Parsing Pipeline to Structure Logs | ||
|
||
Structuring logs enhances their usability and allows for more effective querying and alerting. | ||
|
||
**Steps:** | ||
|
||
1. **Understand Log Pipelines:** | ||
- Read the introduction to [SigNoz Log Parsing Pipelines](https://signoz.io/docs/logs-pipelines/introduction/) to grasp the concepts. | ||
|
||
2. **Define Parsing Rules:** | ||
- Create rules to parse unstructured logs into structured formats (e.g., JSON). | ||
|
||
3. **Configure Pipelines:** | ||
- Set up pipelines in SigNoz to process incoming logs according to your parsing rules. | ||
|
||
4. **Test and Validate:** | ||
- Verify that logs are correctly parsed and that the structured data is available in SigNoz. | ||
|
||
--- | ||
|
||
## Conclusion | ||
|
||
Migrating from DataDog to SigNoz empowers you with an open-source observability platform that is flexible, extensible, and based on open standards. By leveraging OpenTelemetry, you avoid vendor lock-in and ensure compatibility across various tools and services. This guide provides a roadmap for transitioning your metrics, traces, and logs to SigNoz. For more detailed instructions and support, refer to the SigNoz documentation and community resources. | ||
|
||
--- | ||
|
||
**Additional Resources:** | ||
|
||
- **SigNoz Documentation:** [https://signoz.io/docs/](https://signoz.io/docs/) | ||
- **OpenTelemetry Collector Configuration:** [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) | ||
- **Community Support:** Join the SigNoz community on [Slack](https://signoz.io/slack) for assistance. |