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 ownership #5

Merged
merged 17 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ disable=missing-docstring,
missing-module-docstring, # temp-pylint-upgrade
import-error, # needed as a workaround as reported here: https://github.com/open-telemetry/opentelemetry-python-contrib/issues/290
cyclic-import,
E0611,
zzhlogin marked this conversation as resolved.
Show resolved Hide resolved

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This project ensures compatibility with the following supported Python versions:
This package applies code style check automatically when created a push/pull request to the project repository. You can apply style check locally before submitting the PR by following:
1. Install related packages:
```sh
pip install isort pylint black flake8 codespell
pip install isort pylint black flake8 codespell readme_renderer
```
2. Check code style errors using codespell and lint:
```sh
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-distro/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Installation
pip install aws-opentelemetry-distro


This package provides AWS OpenTelemetry Distro for enabling AppSignals, which generates SAM(Standard Application Metrics) and traces for customers’ application in Python.
This package provides AWS OpenTelemetry Python Distro, which allows for auto-instrumentation of Python applications.

References
----------
Expand Down
8 changes: 4 additions & 4 deletions opentelemetry-distro/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ dependencies = [
test = []

[project.entry-points.opentelemetry_configurator]
aws_configurator = "opentelemetry.distro.aws_opentelemetry_configurator:AwsConfigurator"
aws_configurator = "opentelemetry.distro.aws_opentelemetry_configurator:AwsOpenTelemetryConfigurator"

[project.entry-points.opentelemetry_distro]
aws_distro = "opentelemetry.distro.aws_opentelemetry_distro:AwsDistro"
aws_distro = "opentelemetry.distro.aws_opentelemetry_distro:AwsOpenTelemetryDistro"

[project.urls]
Homepage = "https://github.com/aws-observability/aws-otel-python-instrumentation/tree/main/opentelemetry-distro"

[tool.hatch.version]
path = "src/opentelemetry/distro/version.py"
path = "src/amazon/opentelemetry/distro/version.py"

[tool.hatch.build.targets.sdist]
include = [
Expand All @@ -39,4 +39,4 @@ include = [
]

[tool.hatch.build.targets.wheel]
packages = ["src/opentelemetry"]
packages = ["src/amazon/opentelemetry"]
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ def __init__(
# 4. Add AlwaysRecordSampler to record all spans.


class AwsConfigurator(_BaseConfigurator):
# pylint: disable=no-self-use
class AwsOpenTelemetryConfigurator(_BaseConfigurator):
def __init__(self):
self.trace_provider = None

def _configure(self, **kwargs):
provider = AwsTracerProvider()
set_tracer_provider(provider)
self.trace_provider = AwsTracerProvider()
set_tracer_provider(self.trace_provider)

def get_trace_provider(self):
return self.trace_provider
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

__version__ = "0.44b0.dev"
__version__ = "0.0.1"
2 changes: 0 additions & 2 deletions opentelemetry-distro/src/opentelemetry/distro/__init__.py

This file was deleted.

2 changes: 0 additions & 2 deletions opentelemetry-distro/tests/__init__.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase

from opentelemetry.distro.aws_opentelemetry_configurator import (
AwsOpenTelemetryConfigurator,
AwsTracerProvider,
)


class TestAwsOpenTelemetryConfigurator(TestCase):
# pylint: disable=no-self-use
def test_default_configuration(self):
configurator = AwsOpenTelemetryConfigurator()
configurator.configure()
trace_provider = configurator.get_trace_provider()
assert isinstance(trace_provider, AwsTracerProvider)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pkg_resources import DistributionNotFound, require


class TestAWSDistro(TestCase):
class TestAwsOpenTelemetryDistro(TestCase):
def test_package_available(self):
try:
require(["aws-opentelemetry-distro"])
Expand Down
1 change: 0 additions & 1 deletion scripts/check_for_valid_readme.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

"""Test script to check given paths for valid README.rst files."""
import argparse
import sys
Expand Down
3 changes: 1 addition & 2 deletions scripts/eachdist.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

# !/usr/bin/env python3

import argparse
import os
import shlex
Expand Down
Loading