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

Feature: CUS-1729 repo setup #1

Merged
merged 4 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @gymshark/platform @gymshark/customer
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: /
rebase-strategy: "disabled"
schedule:
interval: weekly
groups:
all:
patterns:
- "*"
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## JIRA ticket link/s

Check notice on line 1 in .github/pull_request_template.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/pull_request_template.md#L1

First line in a file should be a top-level heading

- [EXAMPLE-123](https://gymshark-web.atlassian.net/browse/EXAMPLE-123)

## Summary of changes

1. [ Provide some key summary of changes to give context as to why these changes have been made ]

Check notice on line 7 in .github/pull_request_template.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/pull_request_template.md#L7

Expected: 80; Actual: 97

## Additional Info

_[Any additional info such as screenshots or postman collections,etc that will help the reviewer review your changes]_

Check notice on line 11 in .github/pull_request_template.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/pull_request_template.md#L11

Emphasis used instead of a heading

Check notice on line 11 in .github/pull_request_template.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/pull_request_template.md#L11

Expected: 80; Actual: 118
84 changes: 4 additions & 80 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,10 @@ lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

Expand All @@ -57,15 +26,6 @@ web_modules/
# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

Expand All @@ -79,46 +39,6 @@ web_modules/
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

Expand All @@ -128,3 +48,7 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

#IDEs
.idea/
.vscode/
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# DataDog Client JS

This is an opinionated client for integrating with DataDog directly for logging and metrics.

Check notice on line 3 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L3

Expected: 0 or 2; Actual: 1

Check notice on line 3 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L3

Expected: 80; Actual: 93
This package is designed to be a wrapper for simplifying the instantiation of existing package implementations.

Check notice on line 4 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L4

Expected: 80; Actual: 111

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/51830d3cc410417c94543df82dc09a6f)](https://app.codacy.com/gh/gymshark/datadog-client-js/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)

## Requirements

* Node 18.x or higher
* Datadog API and App Key

## Installation

```bash
npm install @gymshark/datadog-client
```

Check notice on line 17 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L17

Fenced code blocks should be surrounded by blank lines
or
```bash

Check notice on line 19 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L19

Fenced code blocks should be surrounded by blank lines
yarn add @gymshark/datadog-client
```

## Usage

### Logger Client

Check notice on line 25 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L25

Expected: 1; Actual: 0; Below
The logging client returns [winston](https://www.npmjs.com/package/winston) logging client that includes a HTTP transport for sending logs to DataDog.

Check notice on line 26 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L26

Expected: 80; Actual: 150
Some of the winston logger options are preset to ensure that logs are sent to DataDog in a JSON format, but any of the winston configuration can be overridden.

Check notice on line 27 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L27

Expected: 80; Actual: 159


Check notice on line 29 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L29

Expected: 1; Actual: 2
```javascript

```


#### Logger Options

### Metric Client

Check notice on line 37 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L37

Expected: 1; Actual: 0; Below
The metric client instantiation either returns [datadog-metrics](https://www.npmjs.com/package/datadog-metrics) metric client or if sampling is enabled, it will return a no-op client that will not send metrics to DataDog.

Check notice on line 38 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L38

Expected: 80; Actual: 221

```javascript

```

#### Metric Options

Check notice on line 44 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L44

Files should end with a single newline character