Skip to content

[Monitor Opentelemetry] Format Azure Monitor Opentelemetry code#44462

Merged
hectorhdzg merged 11 commits intoAzure:mainfrom
hectorhdzg:chore/black-monitor-opentelemetry
Dec 18, 2025
Merged

[Monitor Opentelemetry] Format Azure Monitor Opentelemetry code#44462
hectorhdzg merged 11 commits intoAzure:mainfrom
hectorhdzg:chore/black-monitor-opentelemetry

Conversation

@hectorhdzg
Copy link
Copy Markdown
Member

Ran https://pypi.org/project/black/ to format code

Copilot AI review requested due to automatic review settings December 17, 2025 18:39
@github-actions github-actions bot added Monitor - Distro Monitor OpenTelemetry Distro Monitor - Exporter Monitor OpenTelemetry Exporter labels Dec 17, 2025
@lzchen
Copy link
Copy Markdown
Member

lzchen commented Dec 17, 2025

is black being added to the azure-sdk CI now?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR applies the Black code formatter to the Azure Monitor OpenTelemetry codebase to ensure consistent code formatting across all Python files. The changes are purely cosmetic and focused on improving code style consistency.

Key Changes

  • Reformatted function signatures to comply with Black's line length and formatting rules
  • Added/removed blank lines according to Black's standards
  • Adjusted string formatting and quote consistency
  • Reformatted multi-line function calls and dictionary definitions

Reviewed changes

Copilot reviewed 89 out of 94 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test_utils.py Reformatted function signatures to single lines
test_configurations.py Added blank lines, fixed trailing commas, removed trailing whitespace
test_configure.py Reformatted multi-line patch.dict calls and function arguments
test_psycopg2.py Removed blank line after class definition
test_status_logger.py Removed blank line after function definition
test_diagnostic_logging.py Reformatted multi-line with statements
modify_spans.py Removed blank line after class definition
http_requests.py Added space before inline comment
filter_spans.py Added space before inline comment, removed blank line
live_metrics.py Added space before inline comment
custom_event.py Reformatted multi-line function call
basic.py Added trailing comma
test_instrumentation.py Added blank lines between functions
test_configurations.py (utils) Added blank lines, fixed trailing commas
_configure.py Fixed trailing whitespace, reformatted imports
test_trace_utils.py Added blank lines, removed trailing whitespace
test_trace.py Reformatted dictionary literals
test_sampling.py Removed blank line after class definition
test_rate_limited_sampling.py Extensive reformatting of function calls and hex literals
test_utils.py (exporter) Reformatted patch.dict calls
test_storage.py Added blank lines, reformatted patch calls
test_connection_string_parser.py Reformatted string concatenation
test_base_exporter.py Reformatted patch.dict calls and multi-line statements
test_base_customer_sdkstats.py Added blank lines, reformatted patch calls
test_statsbeat.py Added blank lines, reformatted function signatures
test_metrics.py (statsbeat) Added blank lines
test_manager.py Removed blank lines, reformatted function signatures
test_validate.py Removed blank line after class definition
test_types.py Removed blank lines, reformatted dictionary literals
test_projection.py Moved blank line
test_processor.py (quickpulse) Added blank line, removed trailing blank line
test_policy.py Removed blank line after class definition
test_manager.py (quickpulse) Added blank lines, reformatted function signatures
test_live_metrics.py Reformatted function calls
test_filter.py Fixed string quotes in patch decorators
test_cpu.py Removed blank line, added blank line at end
test_processor.py (performance) Added blank lines
test_performance_counters.py Added blank lines, reformatted function signatures
test_constants.py Reformatted import statement
test_metrics.py (metrics) Reformatted patch.dict calls
test_processor.py (logs) Reformatted function calls and patch statements
test_logs.py Added blank line
test_customer_sdkstats.py Added blank lines, fixed string quotes
test_worker.py Fixed string quotes in patch calls
sample_custom_event.py Reformatted multi-line function call

The formatting changes are consistent with Black's standards and do not introduce any functional changes to the code. All changes are purely cosmetic improvements to code style and readability.

Copy link
Copy Markdown
Member

@pvaneck pvaneck left a comment

Choose a reason for hiding this comment

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

Probably worth opting in to running black in the CI at this point.

Also, black shifted some pylint disable comments which is why pylint has some failures now. I've made some inline suggestions to address these.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 17, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-monitor-opentelemetry-exporter

@hectorhdzg hectorhdzg merged commit 1068818 into Azure:main Dec 18, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Monitor - Distro Monitor OpenTelemetry Distro Monitor - Exporter Monitor OpenTelemetry Exporter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants