Skip to content

Commit 0d4bd97

Browse files
Create a DataDog APM integration page (#790)
* Add DataDog APM page * Fix spelling Co-authored-by: Jamie Sinn <jamie@devcycle.com> * Move rollbar images to rollbar folder * Include Feature data sending to APM * Fix Spelling * Update results section on APM page --------- Co-authored-by: Jamie Sinn <jamie@devcycle.com>
1 parent f2a35ae commit 0d4bd97

File tree

8 files changed

+70
-4
lines changed

8 files changed

+70
-4
lines changed

docs/integrations/datadog-apm.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: DataDog APM
3+
4+
---
5+
6+
DevCycle's clientside Javascript SDKs - including JS and React, can be easily integrated with [DataDog APM](https://docs.datadoghq.com/tracing/) - enhacing visibility into DataDog Traces by supplementing it with data from DevCycle.
7+
8+
![Datadog APM Dashboard](/integrations/datadog-apm/datadog-apm-dashboard.png)
9+
10+
## Configuration
11+
12+
The DevCycle APM integration provides Traces with more depth by passing in DevCycle Feature and/or Variable data during its time of execution, allowing Developers to get a better understanding of the performance impact of each Feature.
13+
14+
### Sending Feature Data
15+
16+
To add Feature data to Traces, we'll retrieve all of our Feature and Variation data using a DevCycle SDK and add that data as metadata to the active Trace. In our example, we send the Feature key and Variation name to DataDog. This can be customized to your liking.
17+
18+
19+
``` javascript
20+
const features = devcycleClient.allFeatures()
21+
22+
const span = tracer.scope().active();
23+
if (span) {
24+
const rootSpan = span.context()._trace.started[0];
25+
Object.entries(features).forEach(([key, metadata]) => {
26+
rootSpan?.setTag(key, metadata['variationName']);
27+
});
28+
}
29+
```
30+
31+
### Sending Variable Data
32+
33+
To add DevCycle Variables to Traces, we'll retrieve Variable data from a DevCycle SDK and add that data as metadata to the active Trace. A simple way to pass along multiple Variables and its values to DataDog is shown below.
34+
35+
``` javascript
36+
const variableA = devcycleClient.variable('new-homepage-hero', 'defaultValue');
37+
const variableB = devcycleClient.variable('new-homepage-layout', 'defaultValue');
38+
39+
const variables = {
40+
variableA: variableA.value,
41+
variableB: variableB.value,
42+
}
43+
44+
const span = tracer.scope().active();
45+
if (span) {
46+
const rootSpan = span.context()._trace.started[0];
47+
Object.entries(variables).forEach(([key, value]) => {
48+
rootSpan?.setTag(key, value);
49+
});
50+
}
51+
```
52+
53+
## Results
54+
55+
DevCycle data will then appear in the span within your traces. In our example, we're passing a `devcycle` object containing the Variable and Variable value combination that's relevant to the current action.
56+
57+
![Datadog APM Spam Metadata](/integrations/datadog-apm/datadog-apm-span.png)
58+
59+
That's it! Check out our [DataDog RUM integration](/integrations/datadog-rum) to see how we can help you enhance your RUM metrics using DevCycle Feature and Variable data.

docs/integrations/datadog-rum.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: DataDog
2+
title: DataDog RUM
33
sidebar_position: 3
44
---
55

docs/integrations/index.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,17 @@ DevCycle APIs, as well as third party integrations to connect DevCycle to the to
172172
{
173173
type: 'link',
174174
href: '/integrations/datadog-rum',
175-
label: 'DataDog Feature Tracking',
175+
label: 'DataDog RUM Feature Tracking',
176176
description: 'Associate served feature flags with RUM sessions',
177177
icon: 'simple-icons:datadog',
178178
},
179+
{
180+
type: 'link',
181+
href: '/integrations/datadog-apm',
182+
label: 'DataDog APM Feature Tracking',
183+
description: 'Associate served feature flags with APM logs and metrics',
184+
icon: 'simple-icons:datadog',
185+
},
179186
{
180187
type: 'link',
181188
href: '/integrations/snowflake',
@@ -198,7 +205,7 @@ DevCycle APIs, as well as third party integrations to connect DevCycle to the to
198205
description:
199206
'Enhance error logging with DevCycle Feature and Variable data',
200207
icon: '',
201-
customIconPath: '/integrations/rollbar-icon.svg'
208+
customIconPath: '/integrations/rollbar/rollbar-icon.svg'
202209
}
203210
]}
204211
/>

docs/integrations/rollbar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,6 @@ try {
119119
120120
Rollbar service links allow you to create links that connect directly with DevCycle, to provide easy access to Features and Variables from the Rollbar interface.
121121
122-
![Screenshot of Service Link from Rollbar](/integrations/rollbar-service-link.png)
122+
![Screenshot of Service Link from Rollbar](/integrations/rollbar/rollbar-service-link.png)
123123
124124
To learn how to create service links for DevCycle, visit the Rollbar docs [here](https://docs.rollbar.com/docs/service-links#devcycle).
112 KB
Loading
37.6 KB
Loading
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)