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

MQ TEST - fix(telemetry): fix integration name telemetry after refactoring to internal #10177

Closed
wants to merge 14 commits into from

Conversation

erikayasuda
Copy link
Contributor

@erikayasuda erikayasuda commented Aug 12, 2024

THIS IS A TEST PR.

It can be merged to test-mq-main, but this is primarily to test the merge queue functionality for our repo.

Original PR this is replicating for the main branch: #10172

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@erikayasuda erikayasuda marked this pull request as ready for review August 12, 2024 14:46
@erikayasuda erikayasuda requested a review from a team as a code owner August 12, 2024 14:46
@erikayasuda erikayasuda requested review from emmettbutler and removed request for a team and emmettbutler August 12, 2024 14:46
@erikayasuda
Copy link
Contributor Author

/merge

Copy link
Contributor

github-actions bot commented Aug 12, 2024

CODEOWNERS have been resolved as:

benchmarks/appsec_iast_aspects/config.yaml                              @DataDog/asm-python
benchmarks/appsec_iast_aspects/scenario.py                              @DataDog/asm-python
benchmarks/bm/iast_utils/aspects_benchmarks_generate.py                 @DataDog/asm-python
releasenotes/notes/feat-server-address-db-client-4e6af4ec4c4ce8ed.yaml  @DataDog/apm-python
.github/CODEOWNERS                                                      @DataDog/python-guild @DataDog/apm-core-python
.gitlab/benchmarks.yml                                                  @DataDog/python-guild @DataDog/apm-core-python
benchmarks/bm/_scenario.py                                              @DataDog/apm-core-python
ddtrace/contrib/cassandra/session.py                                    @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/aiomysql/patch.py                              @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/asyncpg/patch.py                               @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/django/patch.py                                @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/elasticsearch/patch.py                         @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/flask_cache/utils.py                           @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/mariadb/patch.py                                        @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/mysql/patch.py                                          @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/mysqldb/patch.py                                        @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/pymemcache/client.py                                    @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/pymongo/client.py                                       @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/pymysql/patch.py                                        @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/pyodbc/patch.py                                         @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/snowflake/patch.py                                      @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/sqlalchemy/engine.py                                    @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/vertica/patch.py                                        @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/ext/net.py                                                      @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/internal/telemetry/writer.py                                    @DataDog/apm-core-python
tests/appsec/iast/aspects/aspect_utils.py                               @DataDog/asm-python
tests/appsec/iast/aspects/conftest.py                                   @DataDog/asm-python
tests/appsec/iast/aspects/test_add_aspect_fixtures.py                   @DataDog/asm-python
tests/appsec/iast/aspects/test_bytearray_extend_aspect.py               @DataDog/asm-python
tests/appsec/iast/aspects/test_common_replace_aspects.py                @DataDog/asm-python
tests/appsec/iast/aspects/test_encode_decode_aspect.py                  @DataDog/asm-python
tests/appsec/iast/aspects/test_format_aspect_fixtures.py                @DataDog/asm-python
tests/appsec/iast/aspects/test_format_map_aspect_fixtures.py            @DataDog/asm-python
tests/appsec/iast/aspects/test_index_aspect_fixtures.py                 @DataDog/asm-python
tests/appsec/iast/aspects/test_join_aspect_fixtures.py                  @DataDog/asm-python
tests/appsec/iast/aspects/test_modulo_aspect_fixtures.py                @DataDog/asm-python
tests/appsec/iast/aspects/test_ospath_aspects_fixtures.py               @DataDog/asm-python
tests/appsec/iast/aspects/test_other_patching.py                        @DataDog/asm-python
tests/appsec/iast/aspects/test_side_effects.py                          @DataDog/asm-python
tests/appsec/iast/aspects/test_slice_aspect_fixtures.py                 @DataDog/asm-python
tests/appsec/iast/aspects/test_str_aspect.py                            @DataDog/asm-python
tests/appsec/iast/aspects/test_str_py3.py                               @DataDog/asm-python
tests/appsec/iast/test_telemetry.py                                     @DataDog/asm-python
tests/contrib/cassandra/test.py                                         @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/elasticsearch/test_elasticsearch.py                       @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/flask_cache/test_utils.py                                 @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/mariadb/test_mariadb.py                                   @DataDog/apm-core-python @DataDog/apm-idm-python
tests/snapshots/tests.contrib.aiomysql.test_aiomysql.test_async_with_usage.json  @DataDog/apm-python
tests/snapshots/tests.contrib.aiomysql.test_aiomysql.test_pin_override[True].json  @DataDog/apm-python
tests/snapshots/tests.contrib.aiomysql.test_aiomysql.test_queries.json  @DataDog/apm-python
tests/snapshots/tests.contrib.aiomysql.test_aiomysql.test_schematized_span_name[v0].json  @DataDog/apm-python
tests/snapshots/tests.contrib.aiomysql.test_aiomysql.test_schematized_span_name[v1].json  @DataDog/apm-python
tests/snapshots/tests.contrib.aiomysql.test_aiomysql.test_unspecified_service_v1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.aiomysql.test_aiomysql.test_user_specified_service_v0.json  @DataDog/apm-python
tests/snapshots/tests.contrib.aiomysql.test_aiomysql.test_user_specified_service_v1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_bad_query.json  @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_configure_service_name_env_v0.json  @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_configure_service_name_env_v1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_connect.json    @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_connection_methods.json  @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_cursor.json     @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_cursor_manual.json  @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_parenting.json  @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_select.json     @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_service_override_pin.json  @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_span_name_by_schema[v0].json  @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_span_name_by_schema[v1].json  @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_unspecified_service_name_env_v0.json  @DataDog/apm-python
tests/snapshots/tests.contrib.asyncpg.test_asyncpg.test_unspecified_service_name_env_v1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.elasticsearch.test_async.test_elasticsearch.json  @DataDog/apm-python
tests/snapshots/tests.contrib.elasticsearch.test_async.test_elasticsearch7.json  @DataDog/apm-python
tests/snapshots/tests.contrib.elasticsearch.test_async.test_opensearch.json  @DataDog/apm-python
tests/snapshots/tests.contrib.elasticsearch.test_elasticsearch_multi.test_elasticsearch.json  @DataDog/apm-python
tests/snapshots/tests.contrib.elasticsearch.test_elasticsearch_multi.test_elasticsearch7.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_analytics_with_rate_snapshot_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_analytics_with_rate_snapshot_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_analytics_without_rate_snapshot_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_analytics_without_rate_snapshot_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_commit_snapshot_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_commit_snapshot_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_query_many_fetchall_snapshot_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_query_many_fetchall_snapshot_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_query_proc_snapshot_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_query_proc_snapshot_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_query_with_several_rows_fetchall_snapshot_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_query_with_several_rows_fetchall_snapshot_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_query_with_several_rows_snapshot_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_query_with_several_rows_snapshot_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_schematized_service_and_operation[service_schema0]_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_schematized_service_and_operation[service_schema0]_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_schematized_service_and_operation[service_schema1]_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_schematized_service_and_operation[service_schema1]_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_schematized_service_and_operation[service_schema2]_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_schematized_service_and_operation[service_schema2]_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_schematized_service_and_operation[service_schema3]_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_schematized_service_and_operation[service_schema3]_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_schematized_service_and_operation[service_schema4]_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_schematized_service_and_operation[service_schema4]_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_schematized_service_and_operation[service_schema5]_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_schematized_service_and_operation[service_schema5]_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_simple_malformed_query_snapshot_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_simple_malformed_query_snapshot_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_simple_query_fetchall_snapshot_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_simple_query_fetchall_snapshot_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_simple_query_snapshot_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_simple_query_snapshot_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_user_specified_dd_mariadb_service_snapshot_post_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.mariadb.test_mariadb.test_user_specified_dd_mariadb_service_snapshot_pre_1_1.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_schematization[service_schema0].json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_schematization[service_schema1].json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_schematization[service_schema2].json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_schematization[service_schema3].json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_schematization[service_schema4].json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_schematization[service_schema5].json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_analytics_with_rate.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_analytics_without_rate.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_commit.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_executemany_insert.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_fetchall.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_fetchall_multiple_rows.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_fetchone.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_ot_executemany_insert.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_ot_fetchall.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_ot_fetchall_multiple_rows.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_ot_fetchone.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_pin_override.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_rollback.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_service_env.json  @DataDog/apm-python
tests/snapshots/tests.contrib.snowflake.test_snowflake.test_snowflake_settings_override.json  @DataDog/apm-python
tests/telemetry/test_telemetry.py                                       @DataDog/apm-core-python
benchmarks/bm/iast_fixtures/module_functions.py                         @DataDog/apm-core-python
benchmarks/bm/iast_fixtures/str_methods.py                              @DataDog/apm-core-python
benchmarks/bm/iast_fixtures/str_methods_py3.py                          @DataDog/apm-core-python

@dd-devflow
Copy link

dd-devflow bot commented Aug 12, 2024

🚂 MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.

Use /merge -c to cancel this operation!

@erikayasuda
Copy link
Contributor Author

/remove

@dd-devflow
Copy link

dd-devflow bot commented Aug 12, 2024

🚂 Devflow: /remove

@dd-devflow
Copy link

dd-devflow bot commented Aug 12, 2024

⚠️ MergeQueue: This merge request was unqueued

This merge request was unqueued

If you need support, contact us on Slack #devflow!

This is the first part of the effort to add the `server.address` tag to
database clients. Every db span _must_ have a `server.address` tag based
on the [OpenTelemetry
definition](https://opentelemetry.io/docs/specs/semconv/general/attributes/#server-attributes),
as per convention [for database
spans](https://opentelemetry.io/docs/specs/semconv/database/database-spans/).

On the client side, it should match the remote service name; on the
server side it should represent the local service name as seen
externally on clients.

This modifies the following:

- aiomysql
- asyncpg
- cassandra
- django
- elasticsearch
- flask (cache)
- mariadb
- mysql
- mysqldb
- pymongo
- pymemcache
- pymysql
- snowflake
- sqlalchemy
- vertica



The new spans:
<img width="680" alt="Screenshot 2024-08-07 at 12 43 38 PM"
src="https://github.com/user-attachments/assets/a47573c1-fdad-4318-a7ad-af24a25cc40b">



## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Co-authored-by: Emmett Butler <[email protected]>
@pr-commenter
Copy link

pr-commenter bot commented Aug 12, 2024

Benchmarks

Benchmark execution time: 2024-08-12 16:48:00

Comparing candidate commit 5b16a02 in PR branch gnufede/ci-fix-telemetry-test with baseline commit e2cde38 in branch test-mq-main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 214 metrics, 2 unstable metrics.

@gnufede gnufede requested review from a team as code owners August 12, 2024 15:38
@gnufede gnufede removed the request for review from a team August 12, 2024 15:38
## Description

Micro benchmarks for each aspect, comparing the patched and unpatched
performance.

Note: this moves some IAST fixtures from `tests.*` to `benchamarks.*`
because the environment under which the benchmarks are run doesn't have
access to `tests.*` (but tests have access to benchmarks dirs).


## Checklist
- [X] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Signed-off-by: Juanjo Alvarez <[email protected]>
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Aug 12, 2024

Datadog Report

Branch report: gnufede/ci-fix-telemetry-test
Commit report: e72714f
Test service: dd-trace-py

✅ 0 Failed, 1893 Passed, 801 Skipped, 7m 29.19s Total duration (2m 19.71s time saved)

@gnufede gnufede requested review from a team as code owners August 12, 2024 15:57
@erikayasuda erikayasuda changed the title fix(telemetry): fix integration name telemetry after refactoring to internal MQ TEST - fix(telemetry): fix integration name telemetry after refactoring to internal Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants