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

feat: adds oneagent initialization to django start #5

Open
wants to merge 4 commits into
base: jsm-master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions autodynatrace/wrappers/django/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ class DynatraceConfig(AppConfig):
label = "dynatrace_django"

def ready(self):
import oneagent
sdk_options = oneagent.sdkopts_from_commandline(remove=True)
is_forkable_enabled = bool(strtobool(os.getenv("AUTODYNATRACE_FORKABLE", "True")))
oneagent.initialize(sdk_options, forkable=is_forkable_enabled)
instrument_django()
24 changes: 24 additions & 0 deletions azure-templates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
trigger:
branches:
include:
- main
MatheusGeiger marked this conversation as resolved.
Show resolved Hide resolved
paths:
include:
- autodynatrace
- poetry.lock
- pyproject.toml
pr:
- main

resources:
repositories:
- repository: templates
type: github
name: juntossomosmais/azure-pipelines-templates
endpoint: github.com
ref: main

extends:
template: python/library.yaml@templates
parameters:
PublishToArtifacts: true
43 changes: 43 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "autodynatrace"

Choose a reason for hiding this comment

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

[question]
Shouldn't this project be named jsm-autodynatrace?

version = "1.1.2"
description = "Auto instrumentation for the OneAgent SDK"
readme = "README.md"
license = ""
authors = ["Juntos Somos Mais <[email protected]>"]

classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved",
"License :: OSI Approved :: Apache Software License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
Comment on lines +21 to +24

Choose a reason for hiding this comment

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

[suggestion]
Add remaining versions, or keep only Python :: 3

"Programming Language :: Python :: Implementation :: CPython",
"Topic :: System :: Monitoring",
]

[tool.poetry.dependencies]
python = "^3.6"
autowrapt = "^1.0.0"
oneagent-sdk = "^1.3.0"
six = "^1.10.0"
wrapt = "^1.11.2"

[project.entry-points.autodynatrace]
string = "autodynatrace:load"

[project.urls]
Homepage = "https://github.com/juntossomosmais/OneAgent-SDK-Python-AutoInstrumentation"
"Issue Tracker" = "https://github.com/juntossomosmais/OneAgent-SDK-Python-AutoInstrumentation/issues"


Choose a reason for hiding this comment

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

[chore]
Remove empty line

6 changes: 0 additions & 6 deletions setup.cfg

This file was deleted.

33 changes: 0 additions & 33 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{27,35,36,37,38,39}
envlist = py{27,35,36,37,38,39,310,311,312}

[testenv]
deps =
Expand Down