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

Implement new HTTP semantic convention opt-in for Falcon #2790

Merged
merged 36 commits into from
Jan 13, 2025

Conversation

FilipNikolovski
Copy link
Contributor

@FilipNikolovski FilipNikolovski commented Aug 9, 2024

Description

This change updates the falcon instrumentor to adhere to the new HTTP semantic conventions, according to the migration plan outlined here:

also fixes #1532

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Updated the tests to assert that the new span and duration attributes have been added.

@FilipNikolovski FilipNikolovski requested a review from a team August 9, 2024 15:22
Copy link
Member

@emdneto emdneto left a comment

Choose a reason for hiding this comment

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

A big thanks for working on this one. Just some comments

CHANGELOG.md Show resolved Hide resolved
@emdneto emdneto mentioned this pull request Aug 14, 2024
7 tasks
@FilipNikolovski FilipNikolovski requested a review from a team as a code owner December 2, 2024 14:37
@xrmx
Copy link
Contributor

xrmx commented Dec 3, 2024

@FilipNikolovski tox -e generate step is failing, adding _semconv_status = "migration" in package.py should be enough

@FilipNikolovski
Copy link
Contributor Author

@FilipNikolovski tox -e generate step is failing, adding _semconv_status = "migration" in package.py should be enough

Thanks for the feedback. I've updated the file, but that step is still failing 🤷. Not sure if I need to run tox -e generate locally or not?

@xrmx
Copy link
Contributor

xrmx commented Dec 3, 2024

@FilipNikolovski tox -e generate step is failing, adding _semconv_status = "migration" in package.py should be enough

Thanks for the feedback. I've updated the file, but that step is still failing 🤷. Not sure if I need to run tox -e generate locally or not?

You need to run it locally and commit the updated files so it will match on CI

@FilipNikolovski
Copy link
Contributor Author

@xrmx running tox -e generate throws an error for me:

Could not get hatch version from path /opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-sklearn
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opentelemetry-python-contrib/.tox/generate/lib/python3.12/site-pack │
│ ages/hatch/cli/__init__.py:221 in main                                                           │
│                                                                                                  │
│   218                                                                                            │
│   219 def main():  # no cov                                                                      │
│   220 │   try:                                                                                   │
    main()
  File "/opentelemetry-python-contrib/scripts/generate_instrumentation_bootstrap.py", line 70, in main
    for pkg in get_instrumentation_packages():
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opentelemetry-python-contrib/scripts/otel_packaging.py", line 51, in get_instrumentation_packages
    raise exc
  File "/opentelemetry-python-contrib/scripts/otel_packaging.py", line 42, in get_instrumentation_packages
    version = subprocess.check_output(
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.pyenv/versions/3.12.7/lib/python3.12/subprocess.py", line 466, in check_output
│ ❱ 221 │   │   hatch(prog_name='hatch', windows_expand_args=False)                                │
│   222 │   except Exception:  # noqa: BLE001                                                      │
│   223 │   │   import sys                                                                         │
│   224                                                                                            │
│                                                                                                  │
│ /opentelemetry-python-contrib/.tox/generate/lib/python3.12/site-pack │
│ ages/click/core.py:1157 in __call__                                                              │
│                                                                                                  │
│ /opentelemetry-python-contrib/.tox/generate/lib/python3.12/site-pack │
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.pyenv/versions/3.12.7/lib/python3.12/subprocess.py", line 571, in run
│ ages/click/core.py:1078 in main                                                                  │
│                                                                                                  │
│ /opentelemetry-python-contrib/.tox/generate/lib/python3.12/site-pack │
│ ages/click/core.py:1688 in invoke                                                                │
│                                                                                                  │
│ /opentelemetry-python-contrib/.tox/generate/lib/python3.12/site-pack │
│ ages/click/core.py:1434 in invoke                                                                │
│                                                                                                  │
│ /opentelemetry-python-contrib/.tox/generate/lib/python3.12/site-pack │
│ ages/click/core.py:783 in invoke                                                                 │
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'hatch version' returned non-zero exit status 1.
│                                                                                                  │
│ /opentelemetry-python-contrib/.tox/generate/lib/python3.12/site-pack │
│ ages/click/decorators.py:45 in new_func                                                          │
│                                                                                                  │
│ /opentelemetry-python-contrib/.tox/generate/lib/python3.12/site-pack │
│ ages/hatch/cli/version/__init__.py:35 in version                                                 │
│                                                                                                  │
│   32 │   │   if not (                                                                            │
│   33 │   │   │   'version' in app.project.metadata.dynamic or app.project.metadata.hatch.meta    │
│   34 │   │   ) or dependencies_in_sync(app.project.metadata.build.requires_complex):             │
│ ❱ 35 │   │   │   source = app.project.metadata.hatch.version.source                              │
│   36 │   │   │                                                                                   │
│   37 │   │   │   version_data = source.get_version_data()                                        │
│   38 │   │   │   original_version = version_data['version']                                      │
│                                                                                                  │
│ /opentelemetry-python-contrib/.tox/generate/lib/python3.12/site-pack │
│ ages/hatchling/metadata/core.py:1425 in version                                                  │
│                                                                                                  │
│   1422 │   │   if self._version is None:                                                         │
│   1423 │   │   │   if 'version' not in self.config:                                              │
│   1424 │   │   │   │   message = 'Missing `tool.hatch.version` configuration'                    │
│ ❱ 1425 │   │   │   │   raise ValueError(message)                                                 │
│   1426 │   │   │                                                                                 │
│   1427 │   │   │   options = self.config['version']                                              │
│   1428 │   │   │   if not isinstance(options, dict):                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: Missing `tool.hatch.version` configuration

CHANGELOG.md Outdated Show resolved Hide resolved
@FilipNikolovski FilipNikolovski requested a review from xrmx January 2, 2025 08:35
@emdneto emdneto self-requested a review January 2, 2025 16:00
@lzchen lzchen merged commit b7e7d0c into open-telemetry:main Jan 13, 2025
675 checks passed
xrmx pushed a commit to xrmx/opentelemetry-python-contrib that referenced this pull request Jan 24, 2025
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.

Falcon exceptions should not always be masked as 500 and marked as error
4 participants