Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@bonniernews/datadawg
Advanced tools
Readme
Datadawg is a user-friendly library that simplifies the integration of Datadog (dd-trace library) with your application. We've built an easy-to-use configuration wrapper and exported some of the functions we use, making it simple for developers to add custom tracking to their applications, monitor tasks, and report errors with different spans.
To get started with Datadawg, simply install the package via npm:
npm install @bonniernews/datadawg
Next, require datadawg in your application:
const datadawg = require('@bonniernews/datadawg').init({
repositoryUrl: 'github repository url',
sourceVersion: 'github hash'
})
From there, you can begin using Datadawg's various features to track your application's metrics, monitor tasks, and report errors.
Here are a few examples of how to use Datadawg in your application:
According to Datadogs documentation here.
const datadawg = require('@bonniernews/datadawg')
datadawg.trace('Trace name', {resource: 'resource name'}, async () => {
// Your code
})
const datadawg = require('@bonniernews/datadawg')
const error = new Error('something went wrong');
datadawg.noticeError(error)
// notice error with custom attributes
datadawg.noticeError(error, { customAttribute: 'test' })
Adding attributes to a span with addSpan
makes it viewable in the Datadog UI, however, it is not searchable if your Datadog instance it not setup to index all spans which it rarely is. To add custom attributes which are searchable, use the addRootSpan
function. This will add attributes to the root span which is more likely to be indexed and is therefore searchable.
To add custom attributes to the current span, use the addSpan
function.
const datadawg = require('@bonniernews/datadawg')
datadawg.addSpan({ customAttribute: 'test' })
To add custom attributes to the root span, use the addRootSpan
function.
const datadawg = require('@bonniernews/datadawg')
datadawg.addRootSpan({ customAttribute: 'test' })
This library is licensed under the MIT License.
FAQs
Simple configuration management
The npm package @bonniernews/datadawg receives a total of 585 weekly downloads. As such, @bonniernews/datadawg popularity was classified as not popular.
We found that @bonniernews/datadawg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 31 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.