Skip to content

Commit

Permalink
Fix typos (open-telemetry#2868)
Browse files Browse the repository at this point in the history
  • Loading branch information
kianmeng authored Aug 17, 2022
1 parent ad3e239 commit edb1391
Show file tree
Hide file tree
Showing 27 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Allow span limits to be set programatically via TracerProvider.
- Allow span limits to be set programmatically via TracerProvider.
([#1877](https://github.com/open-telemetry/opentelemetry-python/pull/1877))
- Added support for CreateKey functionality.
([#1853](https://github.com/open-telemetry/opentelemetry-python/pull/1853))
Expand Down Expand Up @@ -808,7 +808,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#1194](https://github.com/open-telemetry/opentelemetry-python/pull/1194))
- Make instances of SpanContext immutable
([#1134](https://github.com/open-telemetry/opentelemetry-python/pull/1134))
- Parent is now always passed in via Context, intead of Span or SpanContext
- Parent is now always passed in via Context, instead of Span or SpanContext
([#1146](https://github.com/open-telemetry/opentelemetry-python/pull/1146))
- Update OpenTelemetry protos to v0.5.0
([#1143](https://github.com/open-telemetry/opentelemetry-python/pull/1143))
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,6 @@ automatically load as options for the `opentelemetry-instrument` command.

* docstrings should adhere to the [Google Python Style
Guide](http://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings)
as specified with the [napolean
as specified with the [napoleon
extension](http://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#google-vs-numpy)
extension in [Sphinx](http://www.sphinx-doc.org/en/master/index.html).
4 changes: 2 additions & 2 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ A `hotfix` is defined as a small change developed to correct a bug that should b
1. Identify the packages that are affected by the bug. Make the changes to those packages, merging to `main`, as quickly as possible.
2. On your local machine, remove the `dev0` tags from the version number and increment the patch version number.
3. On your local machine, update `CHANGELOG.md` with the date of the hotfix change.
4. With administrator priviledges for PyPi, manually publish the affected packages.
4. With administrator privileges for PyPi, manually publish the affected packages.
a. Install [twine](https://pypi.org/project/twine/)
b. Navigate to where the `setup.py` file exists for the package you want to publish.
c. Run `python setup.py sdist bdist_wheel`. You may have to install [wheel](https://pypi.org/project/wheel/) as well.
d. Validate your built distributions by running `twine check dist/*`.
e. Upload distibutions to PyPi by running `twine upload dist/*`.
e. Upload distributions to PyPi by running `twine upload dist/*`.
5. Note that since hotfixes are manually published, the build scripts for publish after creating a release are not run.

## Troubleshooting
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/error_handler/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ which just logs the exception to standard logging, as seen here:
AssertionError
When no exception is raised, the code inside the scope of
``GlobalErrorHandler`` is exectued normally:
``GlobalErrorHandler`` is executed normally:

.. code::
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/logs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OpenTelemetry Logs SDK
.. warning::
OpenTelemetry Python logs are in an experimental state. The APIs within
:mod:`opentelemetry.sdk._logs` are subject to change in minor/patch releases and make no
backward compatability guarantees at this time.
backward compatibility guarantees at this time.

Start the Collector locally to see data being exported. Write the following file:

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/opentracing/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# Our example caching library expects an OpenTracing-compliant tracer.
redis_cache = RedisCache(opentracing_tracer)

# Appication code uses an OpenTelemetry Tracer as usual.
# Application code uses an OpenTelemetry Tracer as usual.
tracer = trace.get_tracer(__name__)


Expand Down
2 changes: 1 addition & 1 deletion docs/sdk/logs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ opentelemetry.sdk._logs package
.. warning::
OpenTelemetry Python logs are in an experimental state. The APIs within
:mod:`opentelemetry.sdk._logs` are subject to change in minor/patch releases and make no
backward compatability guarantees at this time.
backward compatibility guarantees at this time.

Once logs become stable, this package will be be renamed to ``opentelemetry.sdk.logs``.

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ struct Span {
3: string name,
4: i64 id, # unique span id, only used for this span
5: optional i64 parent_id, # parent span id
6: list<Annotation> annotations, # all annotations/events that occured, sorted by timestamp
6: list<Annotation> annotations, # all annotations/events that occurred, sorted by timestamp
8: list<BinaryAnnotation> binary_annotations # any binary annotations
9: optional bool debug = 0 # if true, we DEMAND that this span passes all samplers
/**
Expand All @@ -302,7 +302,7 @@ struct Span {
* precise value possible. For example, gettimeofday or syncing nanoTime
* against a tick of currentTimeMillis.
*
* For compatibilty with instrumentation that precede this field, collectors
* For compatibility with instrumentation that precede this field, collectors
* or span stores can derive this via Annotation.timestamp.
* For example, SERVER_RECV.timestamp or CLIENT_SEND.timestamp.
*
Expand All @@ -317,7 +317,7 @@ struct Span {
* precise measurement decoupled from problems of clocks, such as skew or NTP
* updates causing time to move backwards.
*
* For compatibilty with instrumentation that precede this field, collectors
* For compatibility with instrumentation that precede this field, collectors
* or span stores can derive this by subtracting Annotation.timestamp.
* For example, SERVER_SEND.timestamp - SERVER_RECV.timestamp.
*
Expand Down
2 changes: 1 addition & 1 deletion mypy-relaxed.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; This is mainly intended for unit tests and such. So proably going forward, we
; This is mainly intended for unit tests and such. So probably going forward, we
; will disable even more warnings here.
[mypy]
disallow_any_unimported = True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

class ContextVarsRuntimeContext(_RuntimeContext):
"""An implementation of the RuntimeContext interface which wraps ContextVar under
the hood. This is the prefered implementation for usage with Python 3.5+
the hood. This is the preferred implementation for usage with Python 3.5+
"""

_CONTEXT_KEY = "current_context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ def set_mp() -> None:
def set_meter_provider(meter_provider: MeterProvider) -> None:
"""Sets the current global :class:`~.MeterProvider` object.
This can only be done once, a warning will be logged if any furter attempt
This can only be done once, a warning will be logged if any further attempt
is made.
"""
_set_meter_provider(meter_provider, log=True)
Expand Down
10 changes: 5 additions & 5 deletions opentelemetry-api/src/opentelemetry/trace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def get_tracer(
vs. a functional tracer).
Args:
instrumenting_module_name: The uniquely identifiable name for instrumentaion
instrumenting_module_name: The uniquely identifiable name for instrumentation
scope, such as instrumentation library, package, module or class name.
``__name__`` may not be used as this can result in
different tracer names if the tracers are in different files.
Expand Down Expand Up @@ -318,7 +318,7 @@ def start_span(
record_exception: Whether to record any exceptions raised within the
context as error event on the span.
set_status_on_exception: Only relevant if the returned span is used
in a with/context manager. Defines wether the span status will
in a with/context manager. Defines whether the span status will
be automatically set to ERROR when an uncaught exception is
raised in the span with block. The span status won't be set by
this mechanism if it was previously set manually.
Expand Down Expand Up @@ -391,7 +391,7 @@ def function():
record_exception: Whether to record any exceptions raised within the
context as error event on the span.
set_status_on_exception: Only relevant if the returned span is used
in a with/context manager. Defines wether the span status will
in a with/context manager. Defines whether the span status will
be automatically set to ERROR when an uncaught exception is
raised in the span with block. The span status won't be set by
this mechanism if it was previously set manually.
Expand Down Expand Up @@ -524,7 +524,7 @@ def set_tp() -> None:
def set_tracer_provider(tracer_provider: TracerProvider) -> None:
"""Sets the current global :class:`~.TracerProvider` object.
This can only be done once, a warning will be logged if any furter attempt
This can only be done once, a warning will be logged if any further attempt
is made.
"""
_set_tracer_provider(tracer_provider, log=True)
Expand Down Expand Up @@ -562,7 +562,7 @@ def use_span(
record_exception: Whether to record any exceptions raised within the
context as error event on the span.
set_status_on_exception: Only relevant if the returned span is used
in a with/context manager. Defines wether the span status will
in a with/context manager. Defines whether the span status will
be automatically set to ERROR when an uncaught exception is
raised in the span with block. The span status won't be set by
this mechanism if it was previously set manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_no_traceparent_header(self):

def test_headers_with_tracestate(self):
"""When there is a traceparent and tracestate header, data from
both should be addded to the SpanContext.
both should be added to the SpanContext.
"""
traceparent_value = "00-{trace_id}-{span_id}-00".format(
trace_id=format(self.TRACE_ID, "032x"),
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-api/tests/trace/test_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def do_concurrently() -> Mock:
mock_tps_with_any_call[0].get_tracer.call_count, num_threads
)

# should have warned everytime except for the successful set
# should have warned every time except for the successful set
self.assertEqual(mock_logger.warning.call_count, num_threads - 1)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def configure(self, **kwargs):


class _OTelSDKConfigurator(_BaseConfigurator):
"""A basic Configurator by OTel Python for initalizing OTel SDK components
"""A basic Configurator by OTel Python for initializing OTel SDK components
Initializes several crucial OTel SDK components (i.e. TracerProvider,
MeterProvider, Processors...) according to a default implementation. Other
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/opentelemetry/sdk/_logs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def get_log_emitter_provider() -> LogEmitterProvider:
def set_log_emitter_provider(log_emitter_provider: LogEmitterProvider) -> None:
"""Sets the current global :class:`~.LogEmitterProvider` object.
This can only be done once, a warning will be logged if any furter attempt
This can only be done once, a warning will be logged if any further attempt
is made.
"""
global _LOG_EMITTER_PROVIDER # pylint: disable=global-statement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
.. envvar:: OTEL_ATTRIBUTE_COUNT_LIMIT
The :envvar:`OTEL_ATTRIBUTE_COUNT_LIMIT` represents the maximum allowed attribute count for spans, events and links.
This limit is overriden by model specific limits such as OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT.
This limit is overridden by model specific limits such as OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT.
Default: 128
"""

Expand Down Expand Up @@ -343,7 +343,7 @@
.. envvar:: OTEL_EXPORTER_OTLP_TRACES_COMPRESSION
Same as :envvar:`OTEL_EXPORTER_OTLP_COMPRESSION` but only for the span
exporter. If both are present, this takes higher precendence.
exporter. If both are present, this takes higher precedence.
"""

OTEL_EXPORTER_OTLP_TRACES_TIMEOUT = "OTEL_EXPORTER_OTLP_TRACES_TIMEOUT"
Expand Down Expand Up @@ -414,7 +414,7 @@
.. envvar:: OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED
The :envvar:`OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED` environment variable allows users to
enable/disabe the logging SDK auto instrumentation.
enable/disable the logging SDK auto instrumentation.
Default: False
Note: Logs SDK and its related settings are experimental.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ class MetricReader(ABC):
to change, not necessarily all of them. The classes not included in
the passed dictionary will retain their association to their
default aggregations. The aggregation defined here will be
overriden by an aggregation defined by a view that is not
overridden by an aggregation defined by a view that is not
`DefaultAggregation`.
.. document protected _receive_metrics which is a intended to be overriden by subclass
.. document protected _receive_metrics which is a intended to be overridden by subclass
.. automethod:: _receive_metrics
"""

Expand Down Expand Up @@ -325,7 +325,7 @@ def _set_collect_callback(
Iterable["opentelemetry.sdk.metrics.export.Metric"],
],
) -> None:
"""This function is internal to the SDK. It should not be called or overriden by users"""
"""This function is internal to the SDK. It should not be called or overridden by users"""
self._collect = func

@abstractmethod
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/opentelemetry/sdk/trace/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
Sampling probability can be set with ``OTEL_TRACES_SAMPLER_ARG`` if the sampler is traceidratio or parentbased_traceidratio, when not provided rate will be set to 1.0 (maximum rate possible).
Prev example but with environment vairables. Please make sure to set the env ``OTEL_TRACES_SAMPLER=traceidratio`` and ``OTEL_TRACES_SAMPLER_ARG=0.001``.
Prev example but with environment variables. Please make sure to set the env ``OTEL_TRACES_SAMPLER=traceidratio`` and ``OTEL_TRACES_SAMPLER_ARG=0.001``.
.. code:: python
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-sdk/tests/logs/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def test_shutdown(self):

logger.warning("warning message: %s", "possible upcoming heatwave")
logger.error("Very high rise in temperatures across the globe")
logger.critical("Temparature hits high 420 C in Hyderabad")
logger.critical("Temperature hits high 420 C in Hyderabad")

log_processor.shutdown()
self.assertTrue(exporter._stopped)
Expand All @@ -197,7 +197,7 @@ def test_shutdown(self):
("warning message: possible upcoming heatwave", "WARNING"),
("Very high rise in temperatures across the globe", "ERROR"),
(
"Temparature hits high 420 C in Hyderabad",
"Temperature hits high 420 C in Hyderabad",
"CRITICAL",
),
]
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/tests/metrics/test_backward_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
be made in such a way that existing implementations (outside of this repo) continue to work
when *called* by the SDK.
This does not apply to classes which are not intended to be overriden by the user e.g. Meter
This does not apply to classes which are not intended to be overridden by the user e.g. Meter
and PeriodicExportingMetricReader concrete class. Those may freely be modified in a
backward-compatible way for *callers*.
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/tests/trace/test_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def test_probability_sampler_limits(self):
None, 0xFFFFFFFFFFFFFFFF, "span name"
).decision.is_sampled()
)
# Check that the higest effective sampling rate is actually lower than
# Check that the highest effective sampling rate is actually lower than
# the highest theoretical sampling rate. If this test fails the test
# above is wrong.
self.assertLess(
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/tests/trace/test_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def run_general_code(shutdown_on_exit, explicit_shutdown):
self.assertTrue(out.startswith(b"1"))

# test that shutdown is called only once even if Tracer.shutdown is
# called explicitely
# called explicitly
out = run_general_code(True, True)
self.assertTrue(out.startswith(b"1"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class ResourceAttributes:
* **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
Take care not to use the "invoked ARN" directly but replace any
[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple
[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invocable with multiple
different aliases.
* **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)
* **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id).
Expand Down
2 changes: 1 addition & 1 deletion scripts/eachdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ def update_changelog(path, version, new_entry):
text = changelog.read()
if f"## [{version}]" in text:
raise AttributeError(
f"{path} already contans version {version}"
f"{path} already contains version {version}"
)
with open(path, encoding="utf-8") as changelog:
for line in changelog:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ def extract(self, format: object, carrier: object):
"""

# pylint: disable=redefined-builtin
# This implementation does not perform the extracing by itself but
# This implementation does not perform the extracting by itself but
# uses the configured propagators in opentelemetry.propagators.
# TODO: Support Format.BINARY once it is supported in
# opentelemetry-python.
Expand Down

0 comments on commit edb1391

Please sign in to comment.