๐Ÿš€ DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more โ†’
Socket
Book a DemoInstallSign in
Socket

@titicaca/ecs-dd-trace

Package Overview
Dependencies
Maintainers
57
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@titicaca/ecs-dd-trace

Dadadog trace library for Node.js services on ECS

unpublished
latest
Source
npmnpm
Version
4.0.0
Version published
Weekly downloads
0
Maintainers
57
Weekly downloads
ย 
Created
Source

ECS-DD-TRACE

ECS ์—์„œ๋งŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” Node.js Datadog Monitoring Library ์ž…๋‹ˆ๋‹ค.

์ง€์›ํ•˜๋Š” ๊ธฐ๋Šฅ์€ APM ์ธก์ •๊ณผ Metric ์ธก์ •์ž…๋‹ˆ๋‹ค.

Install

Dependency ์— ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”.

$ npm install @titicaca/ecs-dd-trace

APM

APM ๊ธฐ๋Šฅ์€ node.js ๊ฐ€ ์‹œ์ž‘ํ•  ๋•Œ start script ์— ๋„ฃ์–ด์ฃผ๋ฉด ์ž๋™์œผ๋กœ APM ์„ ์ˆ˜์ง‘ํ•ฉ๋‹ˆ๋‹ค.

ENABLE_DD_APM ํ™˜๊ฒฝ ๋ณ€์ˆ˜์— true ๋ฅผ ๋„ฃ์–ด์ค๋‹ˆ๋‹ค.

package.json ์˜ scripts ๋ฅผ ์ˆ˜์ •ํ•ด ์ค๋‹ˆ๋‹ค. --require @titicaca/ecs-dd-trace

{
  "scripts": {
    "start": "NODE_ENV=production node --require @titicaca/ecs-dd-trace dist"
  }
}

PREVENT_PARAMETERIZED_ROUTE_PATH

PREVENT_PARAMETERIZED_ROUTE_PATH ํ™˜๊ฒฝ ๋ณ€์ˆ˜์— true ๋ฅผ ๋„ฃ์–ด์ค„ ๊ฒฝ์šฐ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค.

GET /users/{user_id} ์™€ ๊ฐ™์ด dynamic path routing API ๋ฅผ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ Datadog APM ์—์„œ๋Š” ํ†ต์ผ๋œ API๋กœ ์ฒ˜๋ฆฌํ•˜์ง€๋งŒ ์ด๊ฒƒ์„ ๋ถ„๋ฆฌํ•˜์—ฌ ๋ณด์—ฌ์ฃผ๊ณ  ์‹ถ์€ ์š”๊ตฌ์‚ฌํ•ญ์„ ํ•ด๊ฒฐํ•  ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

Metric

Metric ์€ ์›ํ•˜๋Š” ์ง€ํ‘œ๋ฅผ ์นด์šดํŠธ ํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ์ž…๋‹ˆ๋‹ค.

ENABLE_DD_METRIC ํ™˜๊ฒฝ ๋ณ€์ˆ˜์— true ๋ฅผ ๋„ฃ์–ด์ค๋‹ˆ๋‹ค.

์‚ฌ์šฉ๋ฒ•

const metricClient = await MetricClient.init()
await increaseMetricCount('campaign_api.test')

ํ™˜๊ฒฝ ๋ณ€์ˆ˜

ECS ์—์„œ ๋™์ž‘ํ•˜๋Š” ๋ชจ๋“  ์ปจํ…Œ์ด๋„ˆ์—๋Š” ECS_CONTAINER_METADATA_URI_V4 ํ™˜๊ฒฝ ๋ณ€์ˆ˜๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

FAQs

Package last updated on 09 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts