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

Add OTLP protocol class & protos #821

Merged
merged 11 commits into from
Jun 9, 2023

Conversation

hmstepanek
Copy link
Contributor

Overview

Add an OTLP protocol class and protos to use to upload data to OTLP collector.

@hmstepanek hmstepanek requested a review from a team June 2, 2023 17:28
@hmstepanek hmstepanek changed the base branch from main to develop-scikitlearn June 2, 2023 17:30
@github-actions
Copy link

github-actions bot commented Jun 2, 2023

🦙 MegaLinter status: ❌ ERROR

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON bandit 7 0 6.24s
✅ PYTHON black 9 3 0 2.78s
❌ PYTHON flake8 9 1 1.0s
✅ PYTHON isort 9 3 0 0.29s
❌ PYTHON pylint 9 56 13.39s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@codecov-commenter
Copy link

codecov-commenter commented Jun 2, 2023

Codecov Report

❗ No coverage uploaded for pull request base (develop-scikitlearn@e970884). Click here to learn what that means.
The diff coverage is n/a.

@@                  Coverage Diff                   @@
##             develop-scikitlearn     #821   +/-   ##
======================================================
  Coverage                       ?   76.69%           
======================================================
  Files                          ?      202           
  Lines                          ?    20166           
  Branches                       ?     3427           
======================================================
  Hits                           ?    15467           
  Misses                         ?     3806           
  Partials                       ?      893           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

newrelic/common/otlp_utils.py Outdated Show resolved Hide resolved
newrelic/core/agent_protocol.py Outdated Show resolved Hide resolved
newrelic/core/agent_protocol.py Outdated Show resolved Hide resolved
newrelic/core/agent_protocol.py Show resolved Hide resolved
newrelic/core/agent_protocol.py Outdated Show resolved Hide resolved
newrelic/common/otlp_utils.py Outdated Show resolved Hide resolved
@hmstepanek hmstepanek force-pushed the add-oltp-protocol-class branch 3 times, most recently from 60898ab to 06c5f55 Compare June 7, 2023 23:42
hmstepanek and others added 10 commits June 8, 2023 13:18
The params are not relevant to OTLP so remove these.
The api-key header is how we provide the license key to OTLP so add this.
The path to upload dimensional metrics and events are different in OTLP so expose
the path so it can be overriden inside the coresponding data_collector methods.
@hmstepanek hmstepanek merged commit 30f0bf5 into develop-scikitlearn Jun 9, 2023
@hmstepanek hmstepanek deleted the add-oltp-protocol-class branch June 9, 2023 23:12
@mergify mergify bot removed the tests-failing label Jun 9, 2023
TimPansino added a commit that referenced this pull request Jun 12, 2023
commit 30f0bf5
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Fri Jun 9 16:12:09 2023 -0700

    Add OTLP protocol class & protos (#821)

    * Add protos under packages for otlp

    * Add common otlp proto payload methods

    * Add new oltp protocol class

    * Remove ML event from log message

    * Remove params, add api-key header & expose path

    The params are not relevant to OTLP so remove these.
    The api-key header is how we provide the license key to OTLP so add this.
    The path to upload dimensional metrics and events are different in OTLP so expose
    the path so it can be overriden inside the coresponding data_collector methods.

    * Add otlp_port and otlp_host settings

    * Default to JSON if protobuf not available & warn

    * Move otlp_utils to core

    * Call encode in protocol class

    * Patch issues with data collector

    * Move resource to utils & add log proto imports

    ---------

    Co-authored-by: Tim Pansino <timpansino@gmail.com>

commit e970884
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Thu Jun 8 13:17:28 2023 -0700

    Dimensional Metrics (#815)

    * Wiring dimensional metrics

    * Squashed commit of the following:

    commit c2d4629
    Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
    Date:   Wed May 10 15:59:13 2023 -0700

        Add required option for tox v4 (#795)

        * Add required option for tox v4

        * Update tox in GHA

        * Remove py27 no-cache-dir

    commit a963649
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Tue May 9 10:46:39 2023 -0700

        Run coverage around pytest (#813)

        * Run coverage around pytest

        * Trigger tests

        * Fixup

        * Add redis client_no_touch to ignore list

        * Temporarily remove kafka from coverage

        * Remove coverage for old libs

    commit 3d82845
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Wed May 3 14:50:30 2023 -0700

        Omit some frameworks from coverage analysis (#810)

        * Omit some frameworks from coverage analysis

        * Remove commas

        * Change format of omit

        * Add relative_files option to coverage

        * Add absolute directory

        * Add envsitepackagedir

        * Add coveragerc file

        * Add codecov.yml

        * [Mega-Linter] Apply linters fixes

        * Revert coveragerc file settings

        * Add files in packages and more frameworks

        * Remove commented line

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

    commit fd0fa35
    Author: Uma Annamalai <uannamalai@newrelic.com>
    Date:   Tue May 2 10:55:36 2023 -0700

        Add testing for genshi and mako. (#799)

        * Add testing for genshi and mako.

        * [Mega-Linter] Apply linters fixes

        ---------

        Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit be4fb3d
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Mon May 1 16:01:09 2023 -0700

        Add tests for Waitress (#797)

        * Change import format

        * Initial commit

        * Add more tests to adapter_waitress

        * Remove commented out code

        * [Mega-Linter] Apply linters fixes

        * Add assertions to all tests

        * Add more NR testing to waitress

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 7103506
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 14:12:31 2023 -0700

        Add tests for pyodbc (#796)

        * Add tests for pyodbc

        * Move imports into tests to get import coverage

        * Fixup: remove time import

        * Trigger tests

        ---------

        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 363122a
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 13:34:35 2023 -0700

        Pin virtualenv, fix pip arg deprecation & disable kafka tests (#803)

        * Pin virtualenv

        * Fixup: use 20.21.1 instead

        * Replace install-options with config-settings

        See pypa/pip#11358.

        * Temporarily disable kafka tests

    * Add dimensional stats table to stats engine

    * Add attribute processing to metric identity

    * Add testing for dimensional metrics

    * Cover tags as list not dict

    * Commit suggestions from code review
hmstepanek added a commit that referenced this pull request Jun 23, 2023
* Add protos under packages for otlp

* Add common otlp proto payload methods

* Add new oltp protocol class

* Remove ML event from log message

* Remove params, add api-key header & expose path

The params are not relevant to OTLP so remove these.
The api-key header is how we provide the license key to OTLP so add this.
The path to upload dimensional metrics and events are different in OTLP so expose
the path so it can be overriden inside the coresponding data_collector methods.

* Add metric protos

* Use protos to create payload

* Squashed commit of the following:

commit 6f15520cea6a1098915c9ca340dbe42de6a5de1d
Author: Tim Pansino <timpansino@gmail.com>
Date:   Mon May 15 14:28:50 2023 -0700

    TEMP

commit 1a28d36
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 17:28:27 2023 -0700

    Cover tags as list not dict

commit 71261e3
Merge: 459e085 c2d4629
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Thu May 11 16:59:11 2023 -0700

    Merge branch 'main' into feature-dimensional-metrics

commit 459e085
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 16:57:16 2023 -0700

    Add testing for dimensional metrics

commit ed33957
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 16:56:31 2023 -0700

    Add attribute processing to metric identity

commit 6caf71e
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 16:56:16 2023 -0700

    Add dimensional stats table to stats engine

commit 5e1cc9d
Author: Tim Pansino <timpansino@gmail.com>
Date:   Wed May 10 16:00:42 2023 -0700

    Squashed commit of the following:

    commit c2d4629
    Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
    Date:   Wed May 10 15:59:13 2023 -0700

        Add required option for tox v4 (#795)

        * Add required option for tox v4

        * Update tox in GHA

        * Remove py27 no-cache-dir

    commit a963649
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Tue May 9 10:46:39 2023 -0700

        Run coverage around pytest (#813)

        * Run coverage around pytest

        * Trigger tests

        * Fixup

        * Add redis client_no_touch to ignore list

        * Temporarily remove kafka from coverage

        * Remove coverage for old libs

    commit 3d82845
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Wed May 3 14:50:30 2023 -0700

        Omit some frameworks from coverage analysis (#810)

        * Omit some frameworks from coverage analysis

        * Remove commas

        * Change format of omit

        * Add relative_files option to coverage

        * Add absolute directory

        * Add envsitepackagedir

        * Add coveragerc file

        * Add codecov.yml

        * [Mega-Linter] Apply linters fixes

        * Revert coveragerc file settings

        * Add files in packages and more frameworks

        * Remove commented line

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

    commit fd0fa35
    Author: Uma Annamalai <uannamalai@newrelic.com>
    Date:   Tue May 2 10:55:36 2023 -0700

        Add testing for genshi and mako. (#799)

        * Add testing for genshi and mako.

        * [Mega-Linter] Apply linters fixes

        ---------

        Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit be4fb3d
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Mon May 1 16:01:09 2023 -0700

        Add tests for Waitress (#797)

        * Change import format

        * Initial commit

        * Add more tests to adapter_waitress

        * Remove commented out code

        * [Mega-Linter] Apply linters fixes

        * Add assertions to all tests

        * Add more NR testing to waitress

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 7103506
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 14:12:31 2023 -0700

        Add tests for pyodbc (#796)

        * Add tests for pyodbc

        * Move imports into tests to get import coverage

        * Fixup: remove time import

        * Trigger tests

        ---------

        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 363122a
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 13:34:35 2023 -0700

        Pin virtualenv, fix pip arg deprecation & disable kafka tests (#803)

        * Pin virtualenv

        * Fixup: use 20.21.1 instead

        * Replace install-options with config-settings

        See pypa/pip#11358.

        * Temporarily disable kafka tests

commit c2d4629
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Wed May 10 15:59:13 2023 -0700

    Add required option for tox v4 (#795)

    * Add required option for tox v4

    * Update tox in GHA

    * Remove py27 no-cache-dir

commit a963649
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Tue May 9 10:46:39 2023 -0700

    Run coverage around pytest (#813)

    * Run coverage around pytest

    * Trigger tests

    * Fixup

    * Add redis client_no_touch to ignore list

    * Temporarily remove kafka from coverage

    * Remove coverage for old libs

commit dc81a50
Author: Tim Pansino <timpansino@gmail.com>
Date:   Sat May 6 14:16:14 2023 -0700

    Wiring dimensional metrics

commit 3d82845
Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Date:   Wed May 3 14:50:30 2023 -0700

    Omit some frameworks from coverage analysis (#810)

    * Omit some frameworks from coverage analysis

    * Remove commas

    * Change format of omit

    * Add relative_files option to coverage

    * Add absolute directory

    * Add envsitepackagedir

    * Add coveragerc file

    * Add codecov.yml

    * [Mega-Linter] Apply linters fixes

    * Revert coveragerc file settings

    * Add files in packages and more frameworks

    * Remove commented line

    ---------

    Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
    Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

commit fd0fa35
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Tue May 2 10:55:36 2023 -0700

    Add testing for genshi and mako. (#799)

    * Add testing for genshi and mako.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit be4fb3d
Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Date:   Mon May 1 16:01:09 2023 -0700

    Add tests for Waitress (#797)

    * Change import format

    * Initial commit

    * Add more tests to adapter_waitress

    * Remove commented out code

    * [Mega-Linter] Apply linters fixes

    * Add assertions to all tests

    * Add more NR testing to waitress

    ---------

    Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 7103506
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Mon May 1 14:12:31 2023 -0700

    Add tests for pyodbc (#796)

    * Add tests for pyodbc

    * Move imports into tests to get import coverage

    * Fixup: remove time import

    * Trigger tests

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Squashed commit of the following:

commit 7a384c5
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu Jun 1 12:10:59 2023 -0700

    Cleaning out agent protocol

commit c87d31d
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu Jun 1 12:10:46 2023 -0700

    Change content-type header

commit 5750e54
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu Jun 1 12:05:52 2023 -0700

    Add common utilities for OTLP

* Remove testing logic

* Adding metric serialization helpers

* Squashed commit of the following:

commit a47e209
Author: Tim Pansino <timpansino@gmail.com>
Date:   Tue Jun 6 11:11:30 2023 -0700

    Commit suggestions from code review

commit 1a28d36
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 17:28:27 2023 -0700

    Cover tags as list not dict

commit 71261e3
Merge: 459e085 c2d4629
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Thu May 11 16:59:11 2023 -0700

    Merge branch 'main' into feature-dimensional-metrics

commit 459e085
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 16:57:16 2023 -0700

    Add testing for dimensional metrics

commit ed33957
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 16:56:31 2023 -0700

    Add attribute processing to metric identity

commit 6caf71e
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 16:56:16 2023 -0700

    Add dimensional stats table to stats engine

commit 5e1cc9d
Author: Tim Pansino <timpansino@gmail.com>
Date:   Wed May 10 16:00:42 2023 -0700

    Squashed commit of the following:

    commit c2d4629
    Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
    Date:   Wed May 10 15:59:13 2023 -0700

        Add required option for tox v4 (#795)

        * Add required option for tox v4

        * Update tox in GHA

        * Remove py27 no-cache-dir

    commit a963649
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Tue May 9 10:46:39 2023 -0700

        Run coverage around pytest (#813)

        * Run coverage around pytest

        * Trigger tests

        * Fixup

        * Add redis client_no_touch to ignore list

        * Temporarily remove kafka from coverage

        * Remove coverage for old libs

    commit 3d82845
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Wed May 3 14:50:30 2023 -0700

        Omit some frameworks from coverage analysis (#810)

        * Omit some frameworks from coverage analysis

        * Remove commas

        * Change format of omit

        * Add relative_files option to coverage

        * Add absolute directory

        * Add envsitepackagedir

        * Add coveragerc file

        * Add codecov.yml

        * [Mega-Linter] Apply linters fixes

        * Revert coveragerc file settings

        * Add files in packages and more frameworks

        * Remove commented line

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

    commit fd0fa35
    Author: Uma Annamalai <uannamalai@newrelic.com>
    Date:   Tue May 2 10:55:36 2023 -0700

        Add testing for genshi and mako. (#799)

        * Add testing for genshi and mako.

        * [Mega-Linter] Apply linters fixes

        ---------

        Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit be4fb3d
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Mon May 1 16:01:09 2023 -0700

        Add tests for Waitress (#797)

        * Change import format

        * Initial commit

        * Add more tests to adapter_waitress

        * Remove commented out code

        * [Mega-Linter] Apply linters fixes

        * Add assertions to all tests

        * Add more NR testing to waitress

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 7103506
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 14:12:31 2023 -0700

        Add tests for pyodbc (#796)

        * Add tests for pyodbc

        * Move imports into tests to get import coverage

        * Fixup: remove time import

        * Trigger tests

        ---------

        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 363122a
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 13:34:35 2023 -0700

        Pin virtualenv, fix pip arg deprecation & disable kafka tests (#803)

        * Pin virtualenv

        * Fixup: use 20.21.1 instead

        * Replace install-options with config-settings

        See pypa/pip#11358.

        * Temporarily disable kafka tests

commit c2d4629
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Wed May 10 15:59:13 2023 -0700

    Add required option for tox v4 (#795)

    * Add required option for tox v4

    * Update tox in GHA

    * Remove py27 no-cache-dir

commit a963649
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Tue May 9 10:46:39 2023 -0700

    Run coverage around pytest (#813)

    * Run coverage around pytest

    * Trigger tests

    * Fixup

    * Add redis client_no_touch to ignore list

    * Temporarily remove kafka from coverage

    * Remove coverage for old libs

commit dc81a50
Author: Tim Pansino <timpansino@gmail.com>
Date:   Sat May 6 14:16:14 2023 -0700

    Wiring dimensional metrics

commit 3d82845
Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Date:   Wed May 3 14:50:30 2023 -0700

    Omit some frameworks from coverage analysis (#810)

    * Omit some frameworks from coverage analysis

    * Remove commas

    * Change format of omit

    * Add relative_files option to coverage

    * Add absolute directory

    * Add envsitepackagedir

    * Add coveragerc file

    * Add codecov.yml

    * [Mega-Linter] Apply linters fixes

    * Revert coveragerc file settings

    * Add files in packages and more frameworks

    * Remove commented line

    ---------

    Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
    Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

commit fd0fa35
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Tue May 2 10:55:36 2023 -0700

    Add testing for genshi and mako. (#799)

    * Add testing for genshi and mako.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit be4fb3d
Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Date:   Mon May 1 16:01:09 2023 -0700

    Add tests for Waitress (#797)

    * Change import format

    * Initial commit

    * Add more tests to adapter_waitress

    * Remove commented out code

    * [Mega-Linter] Apply linters fixes

    * Add assertions to all tests

    * Add more NR testing to waitress

    ---------

    Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 7103506
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Mon May 1 14:12:31 2023 -0700

    Add tests for pyodbc (#796)

    * Add tests for pyodbc

    * Move imports into tests to get import coverage

    * Fixup: remove time import

    * Trigger tests

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Add protobuf to agent features tests

* Proper bucket dimensional metric serialization

* Wiring up OTLP protocol for metrics

* Correct metrics payloads

* Make default content-encoding header configurable

* Clean up otlp encoding

* Expand OTLP metrics testing

* Squashed commit of the following:

commit 30f0bf5
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Fri Jun 9 16:12:09 2023 -0700

    Add OTLP protocol class & protos (#821)

    * Add protos under packages for otlp

    * Add common otlp proto payload methods

    * Add new oltp protocol class

    * Remove ML event from log message

    * Remove params, add api-key header & expose path

    The params are not relevant to OTLP so remove these.
    The api-key header is how we provide the license key to OTLP so add this.
    The path to upload dimensional metrics and events are different in OTLP so expose
    the path so it can be overriden inside the coresponding data_collector methods.

    * Add otlp_port and otlp_host settings

    * Default to JSON if protobuf not available & warn

    * Move otlp_utils to core

    * Call encode in protocol class

    * Patch issues with data collector

    * Move resource to utils & add log proto imports

    ---------

    Co-authored-by: Tim Pansino <timpansino@gmail.com>

commit e970884
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Thu Jun 8 13:17:28 2023 -0700

    Dimensional Metrics (#815)

    * Wiring dimensional metrics

    * Squashed commit of the following:

    commit c2d4629
    Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
    Date:   Wed May 10 15:59:13 2023 -0700

        Add required option for tox v4 (#795)

        * Add required option for tox v4

        * Update tox in GHA

        * Remove py27 no-cache-dir

    commit a963649
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Tue May 9 10:46:39 2023 -0700

        Run coverage around pytest (#813)

        * Run coverage around pytest

        * Trigger tests

        * Fixup

        * Add redis client_no_touch to ignore list

        * Temporarily remove kafka from coverage

        * Remove coverage for old libs

    commit 3d82845
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Wed May 3 14:50:30 2023 -0700

        Omit some frameworks from coverage analysis (#810)

        * Omit some frameworks from coverage analysis

        * Remove commas

        * Change format of omit

        * Add relative_files option to coverage

        * Add absolute directory

        * Add envsitepackagedir

        * Add coveragerc file

        * Add codecov.yml

        * [Mega-Linter] Apply linters fixes

        * Revert coveragerc file settings

        * Add files in packages and more frameworks

        * Remove commented line

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

    commit fd0fa35
    Author: Uma Annamalai <uannamalai@newrelic.com>
    Date:   Tue May 2 10:55:36 2023 -0700

        Add testing for genshi and mako. (#799)

        * Add testing for genshi and mako.

        * [Mega-Linter] Apply linters fixes

        ---------

        Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit be4fb3d
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Mon May 1 16:01:09 2023 -0700

        Add tests for Waitress (#797)

        * Change import format

        * Initial commit

        * Add more tests to adapter_waitress

        * Remove commented out code

        * [Mega-Linter] Apply linters fixes

        * Add assertions to all tests

        * Add more NR testing to waitress

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 7103506
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 14:12:31 2023 -0700

        Add tests for pyodbc (#796)

        * Add tests for pyodbc

        * Move imports into tests to get import coverage

        * Fixup: remove time import

        * Trigger tests

        ---------

        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 363122a
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 13:34:35 2023 -0700

        Pin virtualenv, fix pip arg deprecation & disable kafka tests (#803)

        * Pin virtualenv

        * Fixup: use 20.21.1 instead

        * Replace install-options with config-settings

        See pypa/pip#11358.

        * Temporarily disable kafka tests

    * Add dimensional stats table to stats engine

    * Add attribute processing to metric identity

    * Add testing for dimensional metrics

    * Cover tags as list not dict

    * Commit suggestions from code review

* Fix missing resource error

* Add global settings override for otlp_host test

* Fix unbound local variable

* Remove redundant and miscategorized tests

* Migrate and merge otlp utils to core.

* Fix virtualenv for newer tox versions and Py27

* Fix validator for Py27

* Fix dimensional metric normalization

* Fix lint errors

* Fix pypy 27 naming

* Add debug override for metric serialization

* Fix exit code passthrough in tox script

* Make otlp_encode more robust

* Add json vs protobuf testing fixture

* Remove sklearn py27 testing

* Validate resource in OTLP

* Revert unrelated changes from code review

* Fixup: service.provider assertion

---------

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
@umaannamalai umaannamalai added this to the v9.1.0 milestone Sep 14, 2023
hmstepanek added a commit that referenced this pull request Sep 25, 2023
* Add tree model function traces (#691)

* Add sklearn to tox

* Add function traces around model methods

* Support Python 2.7 & 3.7 sklearn

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Refactor

* Follow two digit convention

* Make if-else a one-liner

* Abstract to re-usable instrumentation function

* Use wrap_method_trace & change to Function group

Co-authored-by: Timothy Pansino <TimPansino@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Fixup: use if-else one-liner

* Use hasattr instead of model name check

* Change component_sklearn to mlmodel_sklearn

* Fixup: replace in model names with hasattr

Co-authored-by: Timothy Pansino <TimPansino@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Add config setting for sklearn inference event capture. (#706)

* Add sklearn to tox

* Add function traces around model methods

* Support Python 2.7 & 3.7 sklearn

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Refactor

* Follow two digit convention

* Make if-else a one-liner

* Abstract to re-usable instrumentation function

* Add ML inference event capture config setting.

* [Mega-Linter] Apply linters fixes

* Fixup: remove component_sklearn files

* Add high security mode testing for ML events setting.

* [Mega-Linter] Apply linters fixes

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>

* Capture scorer results (#694)

* Add score results attributes to metric scorers

* Test un-subclassable types

* [Mega-Linter] Apply linters fixes

* [Mega-Linter] Apply linters fixes

* Trigger tests

* Remove custom subclassing code.

* [Mega-Linter] Apply linters fixes

* Remove unused function

* Add test for iterable score results

* Change name of object proxy

* Fixup: rename proxy in tests too

Co-authored-by: hmstepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Tim Pansino <timpansino@gmail.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>

* Add ensemble model function traces (#697)

* Add sklearn to tox

* Add function traces around model methods

* Support Python 2.7 & 3.7 sklearn

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Add ensemble models

* Add ensemble model tests

* Edit tests

* Add ensemble library models from sklearn

* Start tests with empty commit

* Clean up tests

* Fix tests for various versions of sklearn

* Fix ensemble tests with changes from tree PR

* [Mega-Linter] Apply linters fixes

* Remove breakpoints

* Remove commited config files

* Group tests into more readable format

* Pin startlette latest < 0.23.1

* Convert PY3 checks to one-liners

* Use tuple checks for sklearn version

Use tuple checks for sklearn version, string checks can result in unexpected out of
order comparisons. Also use direct comparisons for easier readability.

* Fix VotingRegressor test

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>

* Include training step in metric scorer name (#712)

* Include training step in scorer name

* Add fit_predict data proxying

* Remove name comments

* Fix predict being called before fit

* Re-use existing fixture

* Add cluster model function traces (#700)

* Add sklearn to tox

* Add function traces around model methods

* Support Python 2.7 & 3.7 sklearn

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Add ensemble models

* Add ensemble model tests

* Edit tests

* Add ensemble library models from sklearn

* Start tests with empty commit

* Clean up tests

* Add cluster model instrumentaton

* Fix tests for various versions of sklearn

* Fix ensemble tests with changes from tree PR

* [Mega-Linter] Apply linters fixes

* Fix some cluster model tests

* Fix tests after ensemble PR merge

* Add transform to tests

* Remove accidental commits

* Modify cluster tests to be more readable

* Break up instrumentation models

* Remove duplicate ensemble module defs

* Modify VotingRegressor test

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>

* Add calibration model function traces (#709)

* Add sklearn to tox

* Add function traces around model methods

* Support Python 2.7 & 3.7 sklearn

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Add ensemble models

* Add ensemble model tests

* Edit tests

* Add ensemble library models from sklearn

* Start tests with empty commit

* Clean up tests

* Fix tests for various versions of sklearn

* Fix ensemble tests with changes from tree PR

* [Mega-Linter] Apply linters fixes

* Remove breakpoints

* Create tests/instrumentation for calibration models

* Fix calibration tests

* Remove commented out code

* Remove yaml file in commit

* Remove duplicate ensemble module defs

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>

* Add svm model function traces (#733)

* Add svm models

* Remove extra conditionals from testing

* Add semi supervised models (#732)

* Add pipeline model function traces (#730)

* Add pipeline models

* Remove commented code

* Add neural network model function traces (#729)

* Add neural network models

* Fixup: merge conflict

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

* Add neighbors models (#728)

* Add mixture models (#725)

* Add model selection model function traces (#726)

* Add outline for model selection tests

* Add some testing to model selection

* Add hooks

* Add estimator

* Finish testing for model selection

* Add naive bayes models (#724)

* Add multioutput models (#723)

* Add multiclass models (#722)

* Add kernel ridge model function traces (#721)

* Add kernel ridge models

* Modify VotingRegressor test

* Add custom feature events for sklearn (#727)

* Add function traces around model methods

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Refactor

* Instrument predict function.

* Add data trains fixture.

* Add testing and cleanup for custom feature events.

* Update test_tree_models.

* Add back training step logic to predict proxy.

* Remove unused files.

* Add tree model function traces (#691)

* Add sklearn to tox

* Add function traces around model methods

* Support Python 2.7 & 3.7 sklearn

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Refactor

* Follow two digit convention

* Make if-else a one-liner

* Abstract to re-usable instrumentation function

* Use wrap_method_trace & change to Function group

Co-authored-by: Timothy Pansino <TimPansino@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Fixup: use if-else one-liner

* Use hasattr instead of model name check

* Change component_sklearn to mlmodel_sklearn

* Fixup: replace in model names with hasattr

Co-authored-by: Timothy Pansino <TimPansino@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Add config setting for sklearn inference event capture. (#706)

* Add sklearn to tox

* Add function traces around model methods

* Support Python 2.7 & 3.7 sklearn

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Refactor

* Follow two digit convention

* Make if-else a one-liner

* Abstract to re-usable instrumentation function

* Add ML inference event capture config setting.

* [Mega-Linter] Apply linters fixes

* Fixup: remove component_sklearn files

* Add high security mode testing for ML events setting.

* [Mega-Linter] Apply linters fixes

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>

* Capture scorer results (#694)

* Add score results attributes to metric scorers

* Test un-subclassable types

* [Mega-Linter] Apply linters fixes

* [Mega-Linter] Apply linters fixes

* Trigger tests

* Remove custom subclassing code.

* [Mega-Linter] Apply linters fixes

* Remove unused function

* Add test for iterable score results

* Change name of object proxy

* Fixup: rename proxy in tests too

Co-authored-by: hmstepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Tim Pansino <timpansino@gmail.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>

* Add ensemble model function traces (#697)

* Add sklearn to tox

* Add function traces around model methods

* Support Python 2.7 & 3.7 sklearn

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Add ensemble models

* Add ensemble model tests

* Edit tests

* Add ensemble library models from sklearn

* Start tests with empty commit

* Clean up tests

* Fix tests for various versions of sklearn

* Fix ensemble tests with changes from tree PR

* [Mega-Linter] Apply linters fixes

* Remove breakpoints

* Remove commited config files

* Group tests into more readable format

* Pin startlette latest < 0.23.1

* Convert PY3 checks to one-liners

* Use tuple checks for sklearn version

Use tuple checks for sklearn version, string checks can result in unexpected out of
order comparisons. Also use direct comparisons for easier readability.

* Fix VotingRegressor test

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>

* Add function traces around model methods

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Refactor

* Instrument predict function.

* Add data trains fixture.

* Add testing and cleanup for custom feature events.

* Update test_tree_models.

* Include training step in metric scorer name (#712)

* Include training step in scorer name

* Add fit_predict data proxying

* Remove name comments

* Fix predict being called before fit

* Re-use existing fixture

* Add cluster model function traces (#700)

* Add sklearn to tox

* Add function traces around model methods

* Support Python 2.7 & 3.7 sklearn

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Add ensemble models

* Add ensemble model tests

* Edit tests

* Add ensemble library models from sklearn

* Start tests with empty commit

* Clean up tests

* Add cluster model instrumentaton

* Fix tests for various versions of sklearn

* Fix ensemble tests with changes from tree PR

* [Mega-Linter] Apply linters fixes

* Fix some cluster model tests

* Fix tests after ensemble PR merge

* Add transform to tests

* Remove accidental commits

* Modify cluster tests to be more readable

* Break up instrumentation models

* Remove duplicate ensemble module defs

* Modify VotingRegressor test

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>

* Add calibration model function traces (#709)

* Add sklearn to tox

* Add function traces around model methods

* Support Python 2.7 & 3.7 sklearn

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Add ensemble models

* Add ensemble model tests

* Edit tests

* Add ensemble library models from sklearn

* Start tests with empty commit

* Clean up tests

* Fix tests for various versions of sklearn

* Fix ensemble tests with changes from tree PR

* [Mega-Linter] Apply linters fixes

* Remove breakpoints

* Create tests/instrumentation for calibration models

* Fix calibration tests

* Remove commented out code

* Remove yaml file in commit

* Remove duplicate ensemble module defs

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>

* Add back training step logic to predict proxy.

* Remove unused files.

* Address py27 test failures and review comments.

* Fix py 3.7 failures.

* Remove old component_sklearn.py file

* Fix lint errors

* [Mega-Linter] Apply linters fixes

* Merge redis fix.

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: Timothy Pansino <TimPansino@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>
Co-authored-by: hmstepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Tim Pansino <timpansino@gmail.com>
Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>

* Add feature selection model function traces (#719)

* Add feature selection models

* Modify VotingRegressor test

* Add dummy model function traces (#718)

* Add gaussian process model function traces (#720)

* Add gaussian process models

* Modify VotingRegressor test

* Modify Gaussian Process models tests

* Add discriminant analysis model (#717)

* Add cross decomposition models (#716)

* Add covariance model (#714)

* Add compose models (#713)

* Add linear model function traces (#703)

* Add sklearn to tox

* Add function traces around model methods

* Support Python 2.7 & 3.7 sklearn

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Add ensemble models

* Add ensemble model tests

* Edit tests

* Add ensemble library models from sklearn

* Start tests with empty commit

* Clean up tests

* Initial linear model commit

* Clean up tests for linear models

* Fix tests for various versions of sklearn

* Fix ensemble tests with changes from tree PR

* [Mega-Linter] Apply linters fixes

* Remove breakpoints

* Merge changes from ensemble PR

* Fix tests for v0.20.0

* Rewrite linear tests to be more readable

* Break up instrumentation in config

* Remove commented code

* Remove yaml file in commit

* Remove duplicate ensemble module defs

* Remove old no longer used file

* Remove commented out code.

* Change test name and modify VotingRegressor test

* Push empty commit

* Modify VotingRegression test

* Add estimator to VotingRegressor

* Revert VotingRegressor test

* Fix ensemble tests

* Add different models for VotingRegressor test

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>

* Add ml_model function wrapper API (#739)

* Add function traces around model methods

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Refactor

* Instrument predict function.

* Add data trains fixture.

* Add testing and cleanup for custom feature events.

* Update test_tree_models.

* Add back training step logic to predict proxy.

* Remove unused files.

* Add ml_model wrapper and tests.

* Add column name logic.

* Update branch.

* Update column name mapping logic.

* Fix py2 failures.

* Fix pypy37 failure.

* Revise feature_names logic.

* Add more ml_model wrapper testing.

* Fix linter unused import

* [Mega-Linter] Apply linters fixes

* Bump tests.

* Bump tests.

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>

* Report feature event w/o value (#754)

Report the feature event w/o the raw value if
`machine_learning.inference_event_value.enabled` is False.

* Prediction metric stats (#715)

* Add function traces around model methods

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Refactor

* Instrument predict function.

* Add data trains fixture.

* Add testing and cleanup for custom feature events.

* Update test_tree_models.

* Add back training step logic to predict proxy.

* Remove unused files.

* Update branch.

* Add impl and testing for label events.

* [Mega-Linter] Apply linters fixes

* Add feature_name to expected events for int test.

* Fix py37 test.

* Add function traces around model methods

* Add test for multiple calls to model method

* Fixup: add comments & organize

* Refactor

* Instrument predict function.

* Add data trains fixture.

* Add testing and cleanup for custom feature events.

* Update test_tree_models.

* Add back training step logic to predict proxy.

* Remove unused files.

* Update branch.

* Add impl and testing for label events.

* Add feature_name to expected events for int test.

* [Mega-Linter] Apply linters fixes

* Fix py37 test.

* Update logic to not report value when setting is disabled.

* Fixup flake8 unused import

* Touch up label event logic and rename test_feature_events to test_inference_events.

* Add test case for multilabel output.

* Fix 2D np array test.

* Add metrics about prediction data

* Fixup

* Fix user provided label names

* Fixup label related column name tests

* [Mega-Linter] Apply linters fixes

* Assert label events in multilabel output test

* Remove return of stats

* Remove spaces from version specification

* Fix py2.7 output difference in pandas test

---------

Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
Co-authored-by: hmstepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Add new ML event type (#802)

* Add new machine learning event data type

Co-authored-by: Tim Pansino <TimPansino@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@newrelic.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Validate new machine learning event data type

Co-authored-by: Tim Pansino <TimPansino@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@newrelic.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Fixup: minor inconsistencies

* Fixup

* Remove code coverage fixture

* Fix lint errors

* Increase timeout for python tests

---------

Co-authored-by: Tim Pansino <TimPansino@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@newrelic.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Add machine learning and ml_event config options (#811)

* Add machine learning config options

* machine_learning.enabled
* machine_learning.inference_events.enable
* machine_learning.inference_events.value.enabled
* event_harvest_config.harvest_limits.ml_event_data

Co-authored-by: Lalleh Rafeei <lrafeei@newrelic.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Replace all TODOs w/ new config settings

* [Mega-Linter] Apply linters fixes

* Trigger tests

* Add insights settings & tests

* Remove collect_custom_events & inference_events.enabled

* Revert inference_events_value=>.value

* Remove TODO

* Fixup: format docstring

* Remove file

* Add tests for machine_learning.enabled

---------

Co-authored-by: Lalleh Rafeei <lrafeei@newrelic.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>
Co-authored-by: hmstepanek <hmstepanek@users.noreply.github.com>

* Dimensional Metrics (#815)

* Wiring dimensional metrics

* Squashed commit of the following:

commit c2d4629dfd7787354b6607160bb952913975d5f7
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Wed May 10 15:59:13 2023 -0700

    Add required option for tox v4 (#795)

    * Add required option for tox v4

    * Update tox in GHA

    * Remove py27 no-cache-dir

commit a9636498ab5c20c266fb044a08359c0c9bbcf826
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Tue May 9 10:46:39 2023 -0700

    Run coverage around pytest (#813)

    * Run coverage around pytest

    * Trigger tests

    * Fixup

    * Add redis client_no_touch to ignore list

    * Temporarily remove kafka from coverage

    * Remove coverage for old libs

commit 3d8284540e0acd867c2cf680f43449bc128c0779
Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Date:   Wed May 3 14:50:30 2023 -0700

    Omit some frameworks from coverage analysis (#810)

    * Omit some frameworks from coverage analysis

    * Remove commas

    * Change format of omit

    * Add relative_files option to coverage

    * Add absolute directory

    * Add envsitepackagedir

    * Add coveragerc file

    * Add codecov.yml

    * [Mega-Linter] Apply linters fixes

    * Revert coveragerc file settings

    * Add files in packages and more frameworks

    * Remove commented line

    ---------

    Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
    Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

commit fd0fa35466b630e34e8476cc53ad0e163564e2de
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Tue May 2 10:55:36 2023 -0700

    Add testing for genshi and mako. (#799)

    * Add testing for genshi and mako.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit be4fb3dda0e734889acd6bc53cf91f26c18c2118
Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Date:   Mon May 1 16:01:09 2023 -0700

    Add tests for Waitress (#797)

    * Change import format

    * Initial commit

    * Add more tests to adapter_waitress

    * Remove commented out code

    * [Mega-Linter] Apply linters fixes

    * Add assertions to all tests

    * Add more NR testing to waitress

    ---------

    Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 7103506ca5639d339e3e47dfb9e4affb546c839b
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Mon May 1 14:12:31 2023 -0700

    Add tests for pyodbc (#796)

    * Add tests for pyodbc

    * Move imports into tests to get import coverage

    * Fixup: remove time import

    * Trigger tests

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 363122a0efe0ad9f4784fc1f67fda046cb9bb7e8
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Mon May 1 13:34:35 2023 -0700

    Pin virtualenv, fix pip arg deprecation & disable kafka tests (#803)

    * Pin virtualenv

    * Fixup: use 20.21.1 instead

    * Replace install-options with config-settings

    See https://github.com/pypa/pip/issues/11358.

    * Temporarily disable kafka tests

* Add dimensional stats table to stats engine

* Add attribute processing to metric identity

* Add testing for dimensional metrics

* Cover tags as list not dict

* Commit suggestions from code review

* Add OTLP protocol class & protos (#821)

* Add protos under packages for otlp

* Add common otlp proto payload methods

* Add new oltp protocol class

* Remove ML event from log message

* Remove params, add api-key header & expose path

The params are not relevant to OTLP so remove these.
The api-key header is how we provide the license key to OTLP so add this.
The path to upload dimensional metrics and events are different in OTLP so expose
the path so it can be overriden inside the coresponding data_collector methods.

* Add otlp_port and otlp_host settings

* Default to JSON if protobuf not available & warn

* Move otlp_utils to core

* Call encode in protocol class

* Patch issues with data collector

* Move resource to utils & add log proto imports

---------

Co-authored-by: Tim Pansino <timpansino@gmail.com>

* Fix Testing Failures (#828)

* Fix tastypie tests

* Adjust asgiref pinned version

* Make aioredis key PID unique

* Pin more asgiref versions

* Fix pytest test filtering when running tox (#823)

Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>

* OTLP Serialization for Dimensional Metrics (#826)

* Add protos under packages for otlp

* Add common otlp proto payload methods

* Add new oltp protocol class

* Remove ML event from log message

* Remove params, add api-key header & expose path

The params are not relevant to OTLP so remove these.
The api-key header is how we provide the license key to OTLP so add this.
The path to upload dimensional metrics and events are different in OTLP so expose
the path so it can be overriden inside the coresponding data_collector methods.

* Add metric protos

* Use protos to create payload

* Squashed commit of the following:

commit 6f15520cea6a1098915c9ca340dbe42de6a5de1d
Author: Tim Pansino <timpansino@gmail.com>
Date:   Mon May 15 14:28:50 2023 -0700

    TEMP

commit 1a28d36f86dd3f1fa5ca7a8f56357d168aac69db
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 17:28:27 2023 -0700

    Cover tags as list not dict

commit 71261e3d468320569742a72c690f6ff4e9b3e621
Merge: 459e08567 c2d4629df
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Thu May 11 16:59:11 2023 -0700

    Merge branch 'main' into feature-dimensional-metrics

commit 459e08567102cfadce398b57d245ecf99408400d
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 16:57:16 2023 -0700

    Add testing for dimensional metrics

commit ed33957cd2b20bc1f6e9759a0bad5e4f4a86a38c
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 16:56:31 2023 -0700

    Add attribute processing to metric identity

commit 6caf71ef4386395d950060e0e996f80dbcbfbc32
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 16:56:16 2023 -0700

    Add dimensional stats table to stats engine

commit 5e1cc9dea6d0d9623130dedd0f787408a8439388
Author: Tim Pansino <timpansino@gmail.com>
Date:   Wed May 10 16:00:42 2023 -0700

    Squashed commit of the following:

    commit c2d4629dfd7787354b6607160bb952913975d5f7
    Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
    Date:   Wed May 10 15:59:13 2023 -0700

        Add required option for tox v4 (#795)

        * Add required option for tox v4

        * Update tox in GHA

        * Remove py27 no-cache-dir

    commit a9636498ab5c20c266fb044a08359c0c9bbcf826
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Tue May 9 10:46:39 2023 -0700

        Run coverage around pytest (#813)

        * Run coverage around pytest

        * Trigger tests

        * Fixup

        * Add redis client_no_touch to ignore list

        * Temporarily remove kafka from coverage

        * Remove coverage for old libs

    commit 3d8284540e0acd867c2cf680f43449bc128c0779
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Wed May 3 14:50:30 2023 -0700

        Omit some frameworks from coverage analysis (#810)

        * Omit some frameworks from coverage analysis

        * Remove commas

        * Change format of omit

        * Add relative_files option to coverage

        * Add absolute directory

        * Add envsitepackagedir

        * Add coveragerc file

        * Add codecov.yml

        * [Mega-Linter] Apply linters fixes

        * Revert coveragerc file settings

        * Add files in packages and more frameworks

        * Remove commented line

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

    commit fd0fa35466b630e34e8476cc53ad0e163564e2de
    Author: Uma Annamalai <uannamalai@newrelic.com>
    Date:   Tue May 2 10:55:36 2023 -0700

        Add testing for genshi and mako. (#799)

        * Add testing for genshi and mako.

        * [Mega-Linter] Apply linters fixes

        ---------

        Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit be4fb3dda0e734889acd6bc53cf91f26c18c2118
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Mon May 1 16:01:09 2023 -0700

        Add tests for Waitress (#797)

        * Change import format

        * Initial commit

        * Add more tests to adapter_waitress

        * Remove commented out code

        * [Mega-Linter] Apply linters fixes

        * Add assertions to all tests

        * Add more NR testing to waitress

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 7103506ca5639d339e3e47dfb9e4affb546c839b
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 14:12:31 2023 -0700

        Add tests for pyodbc (#796)

        * Add tests for pyodbc

        * Move imports into tests to get import coverage

        * Fixup: remove time import

        * Trigger tests

        ---------

        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 363122a0efe0ad9f4784fc1f67fda046cb9bb7e8
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 13:34:35 2023 -0700

        Pin virtualenv, fix pip arg deprecation & disable kafka tests (#803)

        * Pin virtualenv

        * Fixup: use 20.21.1 instead

        * Replace install-options with config-settings

        See https://github.com/pypa/pip/issues/11358.

        * Temporarily disable kafka tests

commit c2d4629dfd7787354b6607160bb952913975d5f7
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Wed May 10 15:59:13 2023 -0700

    Add required option for tox v4 (#795)

    * Add required option for tox v4

    * Update tox in GHA

    * Remove py27 no-cache-dir

commit a9636498ab5c20c266fb044a08359c0c9bbcf826
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Tue May 9 10:46:39 2023 -0700

    Run coverage around pytest (#813)

    * Run coverage around pytest

    * Trigger tests

    * Fixup

    * Add redis client_no_touch to ignore list

    * Temporarily remove kafka from coverage

    * Remove coverage for old libs

commit dc81a50a9fc5f2a5ce6978aa064fdfab1618328b
Author: Tim Pansino <timpansino@gmail.com>
Date:   Sat May 6 14:16:14 2023 -0700

    Wiring dimensional metrics

commit 3d8284540e0acd867c2cf680f43449bc128c0779
Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Date:   Wed May 3 14:50:30 2023 -0700

    Omit some frameworks from coverage analysis (#810)

    * Omit some frameworks from coverage analysis

    * Remove commas

    * Change format of omit

    * Add relative_files option to coverage

    * Add absolute directory

    * Add envsitepackagedir

    * Add coveragerc file

    * Add codecov.yml

    * [Mega-Linter] Apply linters fixes

    * Revert coveragerc file settings

    * Add files in packages and more frameworks

    * Remove commented line

    ---------

    Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
    Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

commit fd0fa35466b630e34e8476cc53ad0e163564e2de
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Tue May 2 10:55:36 2023 -0700

    Add testing for genshi and mako. (#799)

    * Add testing for genshi and mako.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit be4fb3dda0e734889acd6bc53cf91f26c18c2118
Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Date:   Mon May 1 16:01:09 2023 -0700

    Add tests for Waitress (#797)

    * Change import format

    * Initial commit

    * Add more tests to adapter_waitress

    * Remove commented out code

    * [Mega-Linter] Apply linters fixes

    * Add assertions to all tests

    * Add more NR testing to waitress

    ---------

    Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 7103506ca5639d339e3e47dfb9e4affb546c839b
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Mon May 1 14:12:31 2023 -0700

    Add tests for pyodbc (#796)

    * Add tests for pyodbc

    * Move imports into tests to get import coverage

    * Fixup: remove time import

    * Trigger tests

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Squashed commit of the following:

commit 7a384c5935f8d6d24db9b488a7e48a6854efedd6
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu Jun 1 12:10:59 2023 -0700

    Cleaning out agent protocol

commit c87d31d5d3a91eb7c584f32f9831fbebc1ffe378
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu Jun 1 12:10:46 2023 -0700

    Change content-type header

commit 5750e546797b16f96e71161f794cb34a253418a6
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu Jun 1 12:05:52 2023 -0700

    Add common utilities for OTLP

* Remove testing logic

* Adding metric serialization helpers

* Squashed commit of the following:

commit a47e209925a210e85bb6c57f0a2efa9e99630b7f
Author: Tim Pansino <timpansino@gmail.com>
Date:   Tue Jun 6 11:11:30 2023 -0700

    Commit suggestions from code review

commit 1a28d36f86dd3f1fa5ca7a8f56357d168aac69db
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 17:28:27 2023 -0700

    Cover tags as list not dict

commit 71261e3d468320569742a72c690f6ff4e9b3e621
Merge: 459e08567 c2d4629df
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Thu May 11 16:59:11 2023 -0700

    Merge branch 'main' into feature-dimensional-metrics

commit 459e08567102cfadce398b57d245ecf99408400d
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 16:57:16 2023 -0700

    Add testing for dimensional metrics

commit ed33957cd2b20bc1f6e9759a0bad5e4f4a86a38c
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 16:56:31 2023 -0700

    Add attribute processing to metric identity

commit 6caf71ef4386395d950060e0e996f80dbcbfbc32
Author: Tim Pansino <timpansino@gmail.com>
Date:   Thu May 11 16:56:16 2023 -0700

    Add dimensional stats table to stats engine

commit 5e1cc9dea6d0d9623130dedd0f787408a8439388
Author: Tim Pansino <timpansino@gmail.com>
Date:   Wed May 10 16:00:42 2023 -0700

    Squashed commit of the following:

    commit c2d4629dfd7787354b6607160bb952913975d5f7
    Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
    Date:   Wed May 10 15:59:13 2023 -0700

        Add required option for tox v4 (#795)

        * Add required option for tox v4

        * Update tox in GHA

        * Remove py27 no-cache-dir

    commit a9636498ab5c20c266fb044a08359c0c9bbcf826
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Tue May 9 10:46:39 2023 -0700

        Run coverage around pytest (#813)

        * Run coverage around pytest

        * Trigger tests

        * Fixup

        * Add redis client_no_touch to ignore list

        * Temporarily remove kafka from coverage

        * Remove coverage for old libs

    commit 3d8284540e0acd867c2cf680f43449bc128c0779
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Wed May 3 14:50:30 2023 -0700

        Omit some frameworks from coverage analysis (#810)

        * Omit some frameworks from coverage analysis

        * Remove commas

        * Change format of omit

        * Add relative_files option to coverage

        * Add absolute directory

        * Add envsitepackagedir

        * Add coveragerc file

        * Add codecov.yml

        * [Mega-Linter] Apply linters fixes

        * Revert coveragerc file settings

        * Add files in packages and more frameworks

        * Remove commented line

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

    commit fd0fa35466b630e34e8476cc53ad0e163564e2de
    Author: Uma Annamalai <uannamalai@newrelic.com>
    Date:   Tue May 2 10:55:36 2023 -0700

        Add testing for genshi and mako. (#799)

        * Add testing for genshi and mako.

        * [Mega-Linter] Apply linters fixes

        ---------

        Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit be4fb3dda0e734889acd6bc53cf91f26c18c2118
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Mon May 1 16:01:09 2023 -0700

        Add tests for Waitress (#797)

        * Change import format

        * Initial commit

        * Add more tests to adapter_waitress

        * Remove commented out code

        * [Mega-Linter] Apply linters fixes

        * Add assertions to all tests

        * Add more NR testing to waitress

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 7103506ca5639d339e3e47dfb9e4affb546c839b
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 14:12:31 2023 -0700

        Add tests for pyodbc (#796)

        * Add tests for pyodbc

        * Move imports into tests to get import coverage

        * Fixup: remove time import

        * Trigger tests

        ---------

        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 363122a0efe0ad9f4784fc1f67fda046cb9bb7e8
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 13:34:35 2023 -0700

        Pin virtualenv, fix pip arg deprecation & disable kafka tests (#803)

        * Pin virtualenv

        * Fixup: use 20.21.1 instead

        * Replace install-options with config-settings

        See https://github.com/pypa/pip/issues/11358.

        * Temporarily disable kafka tests

commit c2d4629dfd7787354b6607160bb952913975d5f7
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Wed May 10 15:59:13 2023 -0700

    Add required option for tox v4 (#795)

    * Add required option for tox v4

    * Update tox in GHA

    * Remove py27 no-cache-dir

commit a9636498ab5c20c266fb044a08359c0c9bbcf826
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Tue May 9 10:46:39 2023 -0700

    Run coverage around pytest (#813)

    * Run coverage around pytest

    * Trigger tests

    * Fixup

    * Add redis client_no_touch to ignore list

    * Temporarily remove kafka from coverage

    * Remove coverage for old libs

commit dc81a50a9fc5f2a5ce6978aa064fdfab1618328b
Author: Tim Pansino <timpansino@gmail.com>
Date:   Sat May 6 14:16:14 2023 -0700

    Wiring dimensional metrics

commit 3d8284540e0acd867c2cf680f43449bc128c0779
Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Date:   Wed May 3 14:50:30 2023 -0700

    Omit some frameworks from coverage analysis (#810)

    * Omit some frameworks from coverage analysis

    * Remove commas

    * Change format of omit

    * Add relative_files option to coverage

    * Add absolute directory

    * Add envsitepackagedir

    * Add coveragerc file

    * Add codecov.yml

    * [Mega-Linter] Apply linters fixes

    * Revert coveragerc file settings

    * Add files in packages and more frameworks

    * Remove commented line

    ---------

    Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
    Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

commit fd0fa35466b630e34e8476cc53ad0e163564e2de
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Tue May 2 10:55:36 2023 -0700

    Add testing for genshi and mako. (#799)

    * Add testing for genshi and mako.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit be4fb3dda0e734889acd6bc53cf91f26c18c2118
Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Date:   Mon May 1 16:01:09 2023 -0700

    Add tests for Waitress (#797)

    * Change import format

    * Initial commit

    * Add more tests to adapter_waitress

    * Remove commented out code

    * [Mega-Linter] Apply linters fixes

    * Add assertions to all tests

    * Add more NR testing to waitress

    ---------

    Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 7103506ca5639d339e3e47dfb9e4affb546c839b
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Mon May 1 14:12:31 2023 -0700

    Add tests for pyodbc (#796)

    * Add tests for pyodbc

    * Move imports into tests to get import coverage

    * Fixup: remove time import

    * Trigger tests

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Add protobuf to agent features tests

* Proper bucket dimensional metric serialization

* Wiring up OTLP protocol for metrics

* Correct metrics payloads

* Make default content-encoding header configurable

* Clean up otlp encoding

* Expand OTLP metrics testing

* Squashed commit of the following:

commit 30f0bf5ce27f239f70b236c639a49715f33ce948
Author: Hannah Stepanek <hstepanek@newrelic.com>
Date:   Fri Jun 9 16:12:09 2023 -0700

    Add OTLP protocol class & protos (#821)

    * Add protos under packages for otlp

    * Add common otlp proto payload methods

    * Add new oltp protocol class

    * Remove ML event from log message

    * Remove params, add api-key header & expose path

    The params are not relevant to OTLP so remove these.
    The api-key header is how we provide the license key to OTLP so add this.
    The path to upload dimensional metrics and events are different in OTLP so expose
    the path so it can be overriden inside the coresponding data_collector methods.

    * Add otlp_port and otlp_host settings

    * Default to JSON if protobuf not available & warn

    * Move otlp_utils to core

    * Call encode in protocol class

    * Patch issues with data collector

    * Move resource to utils & add log proto imports

    ---------

    Co-authored-by: Tim Pansino <timpansino@gmail.com>

commit e970884dac0e1f9c703c6fdbff408fb923502f51
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Thu Jun 8 13:17:28 2023 -0700

    Dimensional Metrics (#815)

    * Wiring dimensional metrics

    * Squashed commit of the following:

    commit c2d4629dfd7787354b6607160bb952913975d5f7
    Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
    Date:   Wed May 10 15:59:13 2023 -0700

        Add required option for tox v4 (#795)

        * Add required option for tox v4

        * Update tox in GHA

        * Remove py27 no-cache-dir

    commit a9636498ab5c20c266fb044a08359c0c9bbcf826
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Tue May 9 10:46:39 2023 -0700

        Run coverage around pytest (#813)

        * Run coverage around pytest

        * Trigger tests

        * Fixup

        * Add redis client_no_touch to ignore list

        * Temporarily remove kafka from coverage

        * Remove coverage for old libs

    commit 3d8284540e0acd867c2cf680f43449bc128c0779
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Wed May 3 14:50:30 2023 -0700

        Omit some frameworks from coverage analysis (#810)

        * Omit some frameworks from coverage analysis

        * Remove commas

        * Change format of omit

        * Add relative_files option to coverage

        * Add absolute directory

        * Add envsitepackagedir

        * Add coveragerc file

        * Add codecov.yml

        * [Mega-Linter] Apply linters fixes

        * Revert coveragerc file settings

        * Add files in packages and more frameworks

        * Remove commented line

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

    commit fd0fa35466b630e34e8476cc53ad0e163564e2de
    Author: Uma Annamalai <uannamalai@newrelic.com>
    Date:   Tue May 2 10:55:36 2023 -0700

        Add testing for genshi and mako. (#799)

        * Add testing for genshi and mako.

        * [Mega-Linter] Apply linters fixes

        ---------

        Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit be4fb3dda0e734889acd6bc53cf91f26c18c2118
    Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Date:   Mon May 1 16:01:09 2023 -0700

        Add tests for Waitress (#797)

        * Change import format

        * Initial commit

        * Add more tests to adapter_waitress

        * Remove commented out code

        * [Mega-Linter] Apply linters fixes

        * Add assertions to all tests

        * Add more NR testing to waitress

        ---------

        Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 7103506ca5639d339e3e47dfb9e4affb546c839b
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 14:12:31 2023 -0700

        Add tests for pyodbc (#796)

        * Add tests for pyodbc

        * Move imports into tests to get import coverage

        * Fixup: remove time import

        * Trigger tests

        ---------

        Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    commit 363122a0efe0ad9f4784fc1f67fda046cb9bb7e8
    Author: Hannah Stepanek <hstepanek@newrelic.com>
    Date:   Mon May 1 13:34:35 2023 -0700

        Pin virtualenv, fix pip arg deprecation & disable kafka tests (#803)

        * Pin virtualenv

        * Fixup: use 20.21.1 instead

        * Replace install-options with config-settings

        See https://github.com/pypa/pip/issues/11358.

        * Temporarily disable kafka tests

    * Add dimensional stats table to stats engine

    * Add attribute processing to metric identity

    * Add testing for dimensional metrics

    * Cover tags as list not dict

    * Commit suggestions from code review

* Fix missing resource error

* Add global settings override for otlp_host test

* Fix unbound local variable

* Remove redundant and miscategorized tests

* Migrate and merge otlp utils to core.

* Fix virtualenv for newer tox versions and Py27

* Fix validator for Py27

* Fix dimensional metric normalization

* Fix lint errors

* Fix pypy 27 naming

* Add debug override for metric serialization

* Fix exit code passthrough in tox script

* Make otlp_encode more robust

* Add json vs protobuf testing fixture

* Remove sklearn py27 testing

* Validate resource in OTLP

* Revert unrelated changes from code review

* Fixup: service.provider assertion

---------

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

* Fix attribute name mismatches from mlops sdk (#845)

* Convert numerical -> numeric

* Adjust attr names to match mlops sdk

* Add feature_/label_ prefix to type & name attrs
* model_name -> modelName

* Set event type to inferenceData

* Backport main into develop-scikitlearn (#847)

* Containerized CI Pipeline (#836)

* Revert "Remove Python 2.7 and pypy2 testing (#835)"

This reverts commit abb6405d2bfd629ed83f48e8a17b4a28e3a3c352.

* Containerize CI process

* Publish new docker container for CI images

* Rename github actions job

* Copyright tag scripts

* Drop debug line

* Swap to new CI image

* Move pip install to just main python

* Remove libcurl special case from tox

* Install special case packages into main image

* Remove unused packages

* Remove all other triggers besides manual

* Add make run command

* Cleanup small bugs

* Fix CI Image Tagging (#838)

* Correct templated CI image name

* Pin pypy2.7 in image

* Fix up scripting

* Temporarily Restore Old CI Pipeline (#841)

* Restore old pipelines

* Remove python 2 from setup-python

* Rework CI Pipeline (#839)

Change pypy to pypy27 in tox.

Fix checkout logic

Pin tox requires

* Fix Tests on New CI (#843)

* Remove non-root user

* Test new CI image

* Change pypy to pypy27 in tox.

* Fix checkout logic

* Fetch git tags properly

* Pin tox requires

* Adjust default db settings for github actions

* Rename elasticsearch services

* Reset to new pipelines

* [Mega-Linter] Apply linters fixes

* Fix timezone

* Fix docker networking

* Pin dev image to new sha

* Standardize gearman DB settings

* Fix elasticsearch settings bug

* Fix gearman bug

* Add missing odbc headers

* Add more debug messages

* Swap out dev ci image

* Fix required virtualenv version

* Swap out dev ci image

* Swap out dev ci image

* Remove aioredis v1 for EOL

* Add coverage paths for docker container

* Unpin ci container

---------

Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>

* Fix pypy27 dependency

* Add skip for OTLP on py27

---------

Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Use Dimensional Metrics in SKLearn (#850)

* Convert ML custom metrics to dimensional with tags

* Rename _class to class_

* Remove typo

* Adjust ML metric tests for dimensional metrics

* Pin sklearn to <1.11.0 for testing

* [Mega-Linter] Apply linters fixes

---------

Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>

* Fixup dependency pinning

* Hook up ml event to OTLP (#822)

* Use protos and otlp protocol class for ml_events

* inferenceData -> InferenceData

* Add LogsData import

* Add utf-8 encoding for json otlp payload

* Cast timestamp to int

* Use ml_event validator in tests

* Fixup payload tests

* Change str_value -> string_value

* Move event payload gen into otlp_utils

* Fixup: put back print

* Fixup: cast as str for py27

* Fixup lint errors

* Skip py2 protobuf

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Fix OTLP Count Metric Serialization (#856)

* Fix metric filtering in OTLP encoding

* Add regression test for duplicate metrics

* Make error message more clear

* Add pylint ignore C0123

* Add explanation comment

* Linting fixups

* Merge main (#874)

* Exclude command line functionality from test coverage (#855)

* FIX: resilient environment settings (#825)

if the application uses generalimport to manage optional depedencies,
it's possible that generalimport.MissingOptionalDependency is raised.
In this case, we should not report the module as it is not actually loaded and
is not a runtime dependency of the application.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

* Replace drop_transaction logic by using transaction context manager (#832)

* Replace drop_transaction call

* [Mega-Linter] Apply linters fixes

* Empty commit to start tests

* Change logic in BG Wrappers

---------

Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Upgrade to Pypy38 for TypedDict (#861)

* Fix base branch

* Revert tox dependencies

* Replace all pypy37 with pypy38

* Remove action.yml file

* Push Empty Commit

* Fix skip_missing_interpreters behavior

* Fix skip_missing_interpreters behavior

* Pin dev CI image sha

* Remove unsupported Tornado tests

* Add latest tests to Tornado

* Remove pypy38 (for now)

---------

Co-authored-by: Tim Pansino <timpansino@gmail.com>

* Add profile_trace testing (#858)

* Include isort stdlibs for determining stdlib modules

* Use isort & sys to eliminate std & builtin modules

Previously, the logic would fail to identify third party modules installed within the
local user socpe. This fixes that issue by skipping builtin and stdlib modules by name,
instead of attempting to identify third party modules based on file paths.

* Handle importlib_metadata.version being a callable

* Add isort into third party notices

* [Mega-Linter] Apply linters fixes

* Remove Python 2.7 and pypy2 testing (#835)

* Change setup-python to @v2 for py2.7

* Remove py27 and pypy testing

* Fix syntax errors

* Fix comma related syntax errors

* Fix more issues in tox

* Remove gearman test

* Containerized CI Pipeline (#836)

* Revert "Remove Python 2.7 and pypy2 testing (#835)"

This reverts commit abb6405d2bfd629ed83f48e8a17b4a28e3a3c352.

* Containerize CI process

* Publish new docker container for CI images

* Rename github actions job

* Copyright tag scripts

* Drop debug line

* Swap to new CI image

* Move pip install to just main python

* Remove libcurl special case from tox

* Install special case packages into main image

* Remove unused packages

* Remove all other triggers besides manual

* Add make run command

* Cleanup small bugs

* Fix CI Image Tagging (#838)

* Correct templated CI image name

* Pin pypy2.7 in image

* Fix up scripting

* Temporarily Restore Old CI Pipeline (#841)

* Restore old pipelines

* Remove python 2 from setup-python

* Rework CI Pipeline (#839)

Change pypy to pypy27 in tox.

Fix checkout logic

Pin tox requires

* Fix Tests on New CI (#843)

* Remove non-root user

* Test new CI image

* Change pypy to pypy27 in tox.

* Fix checkout logic

* Fetch git tags properly

* Pin tox requires

* Adjust default db settings for github actions

* Rename elasticsearch services

* Reset to new pipelines

* [Mega-Linter] Apply linters fixes

* Fix timezone

* Fix docker networking

* Pin dev image to new sha

* Standardize gearman DB settings

* Fix elasticsearch settings bug

* Fix gearman bug

* Add missing odbc headers

* Add more debug messages

* Swap out dev ci image

* Fix required virtualenv version

* Swap out dev ci image

* Swap out dev ci image

* Remove aioredis v1 for EOL

* Add coverage paths for docker container

* Unpin ci container

---------

Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>

* Trigger tests

* Add testing for profile trace.

* [Mega-Linter] Apply linters fixes

* Ignore __call__ from coverage on profile_trace.

* [Mega-Linter] Apply linters fixes

---------

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: hmstepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>
Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>

* Add Transaction API Tests (#857)

* Test for suppress_apdex_metric

* Add custom_metrics tests

* Add distributed_trace_headers testing in existing tests

* [Mega-Linter] Apply linters fixes

* Remove redundant if-statement

* Ignore deprecated transaction function from coverage

* [Mega-Linter] Apply linters fixes

* Push empty commit

* Update newrelic/api/transaction.py

---------

Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>

* Add tests for jinja2. (#842)

* Add tests for jinja2.

* [Mega-Linter] Apply linters fixes

* Update tox.ini

Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>

---------

Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>

* Add tests for newrelic/config.py (#860)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Fix starlette testing matrix for updated behavior. (#869)

Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Correct Serverless Distributed Tracing Logic (#870)

* Fix serverless logic for distributed tracing

* Test stubs

* Collapse testing changes

* Add negative testing to regular DT test suite

* Apply linter fixes

* [Mega-Linter] Apply linters fixes

---------

Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>

* Fix Kafka CI (#863)

* Reenable kafka testing

* Add kafka dev lib

* Sync install python with devcontainer

* Fix kafka local host setting

* Drop set -u flag

* Pin CI image dev sha

* Add parallel flag to kafka

* Fix proper exit status

* Build librdkafka from source

* Updated dev image sha

* Remove coverage exclusions

* Add new options to better emulate GHA

* Reconfigure kafka networking

Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>

* Fix kafka ports on GHA

* Run kafka tests serially

* Separate kafka consumer groups

* Put CI container makefile back

* Remove confluent kafka Py27 for latest

* Roll back ubuntu version update

* Update dev ci sha

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>

* Change image tag to latest (#871)

* Change image tag to latest

* Use built sha

* Fixup

* Replace w/ latest

* Add full version for pypy3.8 to tox (#872)

* Add full version for pypy3.8

* Remove solrpy from tests

* Fix merge conflict

* Fix tests for scikit-learn >= 1.3.0

In 1.3.0 sklearn renamed fit to _fit in BaseDecisionTree.

* Add gfortran to container

* Use ci image sha

* Add pkg-config

* New CI build

---------

Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Co-authored-by: Ahmed Helil <aaeabdo@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Tim Pansino <timpansino@gmail.com>
Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
Co-authored-by: hmstepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>
Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>

* Only send 1 event per prediction & fix tests (#867)

* Only send 1 event per prediction

This changes from sending 1 event per feature/label value to 1 event per prediction.
This change is referred to as a change in "schema".
* Replace feature_name & feature_value and label_name & label_value to
  feature.<name> = <value> and label.<name> = <value>.
* Remove feature_type and label_type.

* Add new_relic_data_schema_version

* Remove pypy3.8-scipy will not compile

* Remove scipy compile deps

* Set ci build back to latest

* Merge redis changes mlops (#914)

* Exclude command line functionality from test coverage (#855)

* FIX: resilient environment settings (#825)

if the application uses generalimport to manage optional depedencies,
it's possible that generalimport.MissingOptionalDependency is raised.
In this case, we should not report the module as it is not actually loaded and
is not a runtime dependency of the application.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

* Replace drop_transaction logic by using transaction context manager (#832)

* Replace drop_transaction call

* [Mega-Linter] Apply linters fixes

* Empty commit to start tests

* Change logic in BG Wrappers

---------

Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Upgrade to Pypy38 for TypedDict (#861)

* Fix base branch

* Revert tox dependencies

* Replace all pypy37 with pypy38

* Remove action.yml file

* Push Empty Commit

* Fix skip_missing_interpreters behavior

* Fix skip_missing_interpreters behavior

* Pin dev CI image sha

* Remove unsupported Tornado tests

* Add latest tests to Tornado

* Remove pypy38 (for now)

---------

Co-authored-by: Tim Pansino <timpansino@gmail.com>

* Add profile_trace testing (#858)

* Include isort stdlibs for determining stdlib modules

* Use isort & sys to eliminate std & builtin modules

Previously, the logic would fail to identify third party modules installed within the
local user socpe. This fixes that issue by skipping builtin and stdlib modules by name,
instead of attempting to identify third party modules based on file paths.

* Handle importlib_metadata.version being a callable

* Add isort into third party notices

* [Mega-Linter] Apply linters fixes

* Remove Python 2.7 and pypy2 testing (#835)

* Change setup-python to @v2 for py2.7

* Remove py27 and pypy testing

* Fix syntax errors

* Fix comma related syntax errors

* Fix more issues in tox

* Remove gearman test

* Containerized CI Pipeline (#836)

* Revert "Remove Python 2.7 and pypy2 testing (#835)"

This reverts commit abb6405d2bfd629ed83f48e8a17b4a28e3a3c352.

* Containerize CI process

* Publish new docker container for CI images

* Rename github actions job

* Copyright tag scripts

* Drop debug line

* Swap to new CI image

* Move pip install to just main python

* Remove libcurl special case from tox

* Install special case packages into main image

* Remove unused packages

* Remove all other triggers besides manual

* Add make run command

* Cleanup small bugs

* Fix CI Image Tagging (#838)

* Correct templated CI image name

* Pin pypy2.7 in image

* Fix up scripting

* Temporarily Restore Old CI Pipeline (#841)

* Restore old pipelines

* Remove python 2 from setup-python

* Rework CI Pipeline (#839)

Change pypy to pypy27 in tox.

Fix checkout logic

Pin tox requires

* Fix Tests on New CI (#843)

* Remove non-root user

* Test new CI image

* Change pypy to pypy27 in tox.

* Fix checkout logic

* Fetch git tags properly

* Pin tox requires

* Adjust default db settings for github actions

* Rename elasticsearch services

* Reset to new pipelines

* [Mega-Linter] Apply linters fixes

* Fix timezone

* Fix docker networking

* Pin dev image to new sha

* Standardize gearman DB settings

* Fix elasticsearch settings bug

* Fix gearman bug

* Add missing odbc headers

* Add m…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants