Skip to content
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

chore: move setTags() to a separate file #322

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

lym953
Copy link
Contributor

@lym953 lym953 commented Nov 7, 2024

Background

Right now datadog-lambda.ts has a function setTags(), which sets env, service, version and custom tags passed via DatadogLambdaProps.

What does this PR do?

Moves this function and its associated tests to separate files tag.ts and tag.spec.ts, so they can be reused by Step Function code.

Motivation

Testing Guidelines

Existing tests still pass.

Additional Notes

Next step:

Need a stamp from Cloud Tracing team, who, as the downstream consumer, should know what tags should be set here.

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog

import * as lambda from "aws-cdk-lib/aws-lambda";
import { DatadogLambda } from "../src/index";

const versionJson = require("../version.json");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Code Quality Violation

Require statement not part of import statement. (...read more)

Use ESM instead of CommonJS imports.

View in Datadog  Leave us feedback  Documentation

@lym953 lym953 marked this pull request as ready for review November 7, 2024 20:18
@lym953 lym953 requested a review from a team as a code owner November 7, 2024 20:19
@lym953 lym953 changed the title refactor: move setTags() to a separate file chore: move setTags() to a separate file Nov 7, 2024
@lym953
Copy link
Contributor Author

lym953 commented Nov 7, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Nov 7, 2024

Devflow running: /merge

View all feedbacks in Devflow UI.


2024-11-07 22:50:10 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in main is 8m.

@dd-mergequeue dd-mergequeue bot merged commit 6b6a826 into main Nov 7, 2024
13 of 17 checks passed
@dd-mergequeue dd-mergequeue bot deleted the yiming.luo/step-function-support-4 branch November 7, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants