Skip to content

Commit

Permalink
Start of a DataDog operator
Browse files Browse the repository at this point in the history
This is still in the very early stages of development
  • Loading branch information
battleoverflow committed Jan 31, 2024
1 parent 943ba88 commit d0caa0a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ loguru
statsd
requests
pyshorteners
twitter
twitter
ddtrace
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
'beanstalk': ['greenstalk'],
'sqs': ['boto3'],
'mysql': ['pymysql'],
'datadog': ['ddtrace'],
'extras': ['hug', 'boto3', 'greenstalk', 'watchdog'],
'all': extra_requires,
},
Expand Down
2 changes: 2 additions & 0 deletions threatingestor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
logger.info("Notifiers is not installed.")
notifiers = None

# import ddtrace.profiling.auto

import threatingestor.config
import threatingestor.state
import threatingestor.exceptions
Expand Down
17 changes: 17 additions & 0 deletions threatingestor/operators/datadog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from ddtrace import tracer
from ddtrace.profiling import Profiler

from threatingestor.operators import Operator

class Plugin(Operator):
"""
Operator for activating DataDog APM
"""

def __init__(self, hostname=None, port=None, https=False, artifact_types=None, filter_string=None, allowed_sources=None):
"""
DataDog operator
"""

self.tracer = tracer.configure(hostname=hostname, port=port, https=https)
self.profile = Profiler()

0 comments on commit d0caa0a

Please sign in to comment.