Skip to content
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
2 changes: 0 additions & 2 deletions .github/workflows/build-ci-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ jobs:
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ steps.image-name.outputs.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
cache-from: type=gha,scope=build-${{ matrix.cache_tag }}
cache-to: type=gha,scope=build-${{ matrix.cache_tag }}

- name: Export Digest
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ jobs:

- name: Upload Trivy scan results to GitHub Security tab
if: ${{ github.event_name == 'schedule' }}
uses: github/codeql-action/upload-sarif@f1f6e5f6af878fb37288ce1c627459e94dbf7d01 # 3.30.1
uses: github/codeql-action/upload-sarif@192325c86100d080feab897ff886c34abd4c83a3 # 3.30.3
with:
sarif_file: "trivy-results.sarif"
15 changes: 15 additions & 0 deletions newrelic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import threading
import time
import traceback
from datetime import datetime, timezone
from pathlib import Path

import newrelic.api.application
Expand Down Expand Up @@ -54,6 +55,8 @@

_logger = logging.getLogger(__name__)

DEPRECATED_MODULES = {"aioredis": datetime(2022, 2, 22, 0, 0, tzinfo=timezone.utc)}


def _map_aws_account_id(s):
return newrelic.core.config._map_aws_account_id(s, _logger)
Expand Down Expand Up @@ -1105,6 +1108,18 @@ def _module_import_hook(target, module, function):
def _instrument(target):
_logger.debug("instrument module %s", ((target, module, function),))

# Deprecation warning for archived/unsupported modules
library_name = target.__package__.split(".")[0]

if library_name in DEPRECATED_MODULES:
_logger.warning(
"%(module)s has been archived by the developers "
"and has not been supported since %(date)s. %(module)s "
"support will be removed from New Relic in a future "
"release.",
{"module": library_name, "date": DEPRECATED_MODULES[library_name].strftime("%B %d, %Y")},
)

try:
instrumented = target._nr_instrumented
except AttributeError:
Expand Down
Loading