Skip to content

Commit

Permalink
feat: update example code and doc to use DatadogLambda
Browse files Browse the repository at this point in the history
  • Loading branch information
lym953 committed Oct 16, 2024
1 parent a5c1c80 commit 43990ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ Add this to your CDK stack:
#### TypeScript

```typescript
import { Datadog } from "datadog-cdk-constructs-v2";
import { DatadogLambda } from "datadog-cdk-constructs-v2";

const datadog = new Datadog(this, "Datadog", {
const datadog = new DatadogLambda(this, "Datadog", {
nodeLayerVersion: <LAYER_VERSION>,
pythonLayerVersion: <LAYER_VERSION>,
javaLayerVersion: <LAYER_VERSION>,
Expand Down Expand Up @@ -120,10 +120,10 @@ datadog.addForwarderToNonLambdaLogGroups([<LOG_GROUPS>])
import (
"github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
)
datadog := ddcdkconstruct.NewDatadog(
datadog := ddcdkconstruct.NewDatadogLambda(
stack,
jsii.String("Datadog"),
&ddcdkconstruct.DatadogProps{
&ddcdkconstruct.DatadogLambdaProps{
NodeLayerVersion: jsii.Number(<LAYER_VERSION>),
AddLayers: jsii.Bool(<BOOLEAN>),
Site: jsii.String(<SITE>),
Expand Down
4 changes: 2 additions & 2 deletions examples/go-stack/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ func NewAppStackWithDatadogOldApi(scope constructs.Construct, id string, props *
stack, lambdaFunction := NewAppStackWithoutDatadog(scope, &id, props)

// Set up Datadog integration
datadog := ddcdkconstruct.NewDatadog(
datadog := ddcdkconstruct.NewDatadogLambda(
stack,
jsii.String("Datadog"),
&ddcdkconstruct.DatadogProps{
&ddcdkconstruct.DatadogLambdaProps{
NodeLayerVersion: jsii.Number(113),
PythonLayerVersion: jsii.Number(97),
JavaLayerVersion: jsii.Number(21),
Expand Down

0 comments on commit 43990ce

Please sign in to comment.