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

Overhaul initialization to align with upstream [DRAFT / WIP] #464

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d020937
Partial work towards using upstream configurator and removing our cus…
johnbley Jun 7, 2024
1302d13
Lint progress
johnbley Jun 7, 2024
9ca61e0
More lint/formatting
johnbley Jun 7, 2024
1a07340
More lint progress
johnbley Jun 7, 2024
4176077
lint
johnbley Jun 7, 2024
e65a35f
lint
johnbley Jun 7, 2024
f59d3f0
Removing unnecessary/duplicative tests
johnbley Jun 7, 2024
44d23ae
Removing unnecessary/duplicative tests
johnbley Jun 7, 2024
f3523c7
lint
johnbley Jun 7, 2024
bc06150
First attempt at deprecating methods
johnbley Jun 10, 2024
dc498f1
Reimplement x-sf-token logic using upstream environment variable
johnbley Jun 10, 2024
80d305a
Implement splunk.distro.version as simple resource attribute
johnbley Jun 10, 2024
0879327
Move and simplify otel defaults settings
johnbley Jun 10, 2024
3f14aad
Delete rather than deprecate unnecessary initialziation methods
johnbley Jun 10, 2024
662bd45
Remove OTEL_PYTHON_LOG_CORRELATION=true as a default
johnbley Jun 10, 2024
1d8163e
Change version to 2.0
johnbley Jun 10, 2024
0d5c728
add tests and remove old ones (#470)
pmcollins Jul 2, 2024
fd812d8
Merge branch 'main' into initialization_overhaul
johnbley Jul 2, 2024
619913f
Drop outdated propagation config test, keep propagation logic test
johnbley Jul 2, 2024
7e88ec0
Remove service/resource stuff from profiling api, adjust tests
johnbley Jul 2, 2024
2ce2b85
Try out pip upgrade that might work for windows?
johnbley Jul 2, 2024
b8cdbd9
Linting
johnbley Jul 2, 2024
4dd654f
more linting
johnbley Jul 2, 2024
f587d48
yet more linting
johnbley Jul 2, 2024
0bc54d3
Fix lint in integration tests too
johnbley Jul 2, 2024
a2817e5
use splunk-py-trace for itegration test
johnbley Jul 2, 2024
6fb486e
Add brief line in CHANGELOG that will need to be expanded in future
johnbley Jul 2, 2024
8db91dd
Clean up handling of default environment variables
johnbley Jul 3, 2024
8c3bedc
document make develop properly
johnbley Jul 3, 2024
783d149
add unit tests and remove integration tests
pmcollins Jul 10, 2024
aec41f3
Add two oteltest scripts, http and grpc
pmcollins Jul 26, 2024
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
Prev Previous commit
Next Next commit
lint
  • Loading branch information
johnbley committed Jun 7, 2024
commit e65a35f84d60f73cebd485af40c77515a8a7eec1
3 changes: 1 addition & 2 deletions splunk_otel/distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

from opentelemetry.instrumentation.distro import BaseDistro # type: ignore
from opentelemetry.sdk._configuration import _OTelSDKConfigurator
from pkg_resources import EntryPoint

from splunk_otel.options import _Options
from splunk_otel.profiling import _start_profiling
Expand All @@ -42,4 +41,4 @@ def _configure(self, **kwargs: Dict[str, Any]) -> None:
# FIXME _configure_Tracing and _metrics might have some unique stuff to copy thrugh to here

if self._profiling_enabled:
_start_profiling(ProfilingOptions(options.resource))
_start_profiling(ProfilingOptions())
15 changes: 1 addition & 14 deletions splunk_otel/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
# limitations under the License.

import logging
from functools import partial
from os import environ
from typing import Callable, Collection, Dict, List, Optional, Tuple, Union
from typing import Callable, Optional

from opentelemetry.environment_variables import OTEL_TRACES_EXPORTER
from opentelemetry.instrumentation.propagators import ResponsePropagator
from opentelemetry.instrumentation.version import (
__version__ as auto_instrumentation_version,
Expand All @@ -31,29 +29,18 @@
OTEL_SPAN_EVENT_COUNT_LIMIT,
OTEL_SPAN_LINK_COUNT_LIMIT,
)
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace.export import SpanExporter
from pkg_resources import iter_entry_points

from splunk_otel.environment_variables import (
_SPLUNK_ACCESS_TOKEN,
_SPLUNK_TRACE_RESPONSE_HEADER_ENABLED,
)
from splunk_otel.propagators import _ServerTimingResponsePropagator
from splunk_otel.symbols import (
_DEFAULT_EXPORTERS,
_DEFAULT_MAX_ATTR_LENGTH,
_DEFAULT_OTEL_SERVICE_NAME,
_DEFAULT_SERVICE_NAME,
_DEFAULT_SPAN_LINK_COUNT_LIMIT,
_EXPORTER_OTLP,
_EXPORTER_OTLP_GRPC,
_KNOWN_EXPORTER_PACKAGES,
_LIMIT_UNSET_VALUE,
_NO_SERVICE_NAME_WARNING,
_SERVICE_NAME_ATTR,
_SPLUNK_DISTRO_VERSION_ATTR,
_TELEMETRY_VERSION_ATTR,
)
from splunk_otel.util import _is_truthy_str
from splunk_otel.version import __version__
Expand Down
1 change: 1 addition & 0 deletions splunk_otel/profiling/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ def _start_profiling(opts):
_start_profiler_thread(profiler)


# pylint: disable=unused-argument
def start_profiling(
service_name: Optional[str] = None,
resource_attributes: Optional[Dict[str, Union[str, bool, int, float]]] = None,
Expand Down
Loading