File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
opentelemetry-instrumentation/src/opentelemetry/instrumentation Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414- Refactoring custom header collection API for consistency
1515 ([ #1064 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1064 ) )
1616
17+ ### Added
18+ - ` opentelemetry-instrument ` and ` opentelemetry-bootstrap ` now include a ` --version ` flag
19+ ([ #1065 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1065 ) )
20+
1721## [ 1.11.1-0.30b1] ( https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.11.1-0.30b1 ) - 2022-04-21
1822
1923### Added
Original file line number Diff line number Diff line change 2323
2424from pkg_resources import iter_entry_points
2525
26+ from opentelemetry .instrumentation .version import __version__
27+
2628_logger = getLogger (__name__ )
2729
2830
@@ -34,7 +36,7 @@ def run() -> None:
3436 program and its dependencies and then runs the program.
3537 """ ,
3638 epilog = """
37- Optional arguments (except for --help) for opentelemetry-instrument
39+ Optional arguments (except for --help and --version ) for opentelemetry-instrument
3840 directly correspond with OpenTelemetry environment variables. The
3941 corresponding optional argument is formed by removing the OTEL_ or
4042 OTEL_PYTHON_ prefix from the environment variable and lower casing the
@@ -66,6 +68,12 @@ def run() -> None:
6668 )
6769 argument_otel_environment_variable [argument ] = attribute
6870
71+ parser .add_argument (
72+ "--version" ,
73+ help = "print version information" ,
74+ action = "version" ,
75+ version = "%(prog)s " + __version__ ,
76+ )
6977 parser .add_argument ("command" , help = "Your Python application." )
7078 parser .add_argument (
7179 "command_args" ,
Original file line number Diff line number Diff line change 2525 default_instrumentations ,
2626 libraries ,
2727)
28+ from opentelemetry .instrumentation .version import __version__
2829
2930logger = logging .getLogger (__name__ )
3031
@@ -133,6 +134,12 @@ def run() -> None:
133134 installs the relevant instrumentation packages for them.
134135 """
135136 )
137+ parser .add_argument (
138+ "--version" ,
139+ help = "print version information" ,
140+ action = "version" ,
141+ version = "%(prog)s " + __version__ ,
142+ )
136143 parser .add_argument (
137144 "-a" ,
138145 "--action" ,
You can’t perform that action at this time.
0 commit comments