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

Remove http status text attribute #750

Merged
Merged
Show file tree
Hide file tree
Changes from all 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: 0 additions & 1 deletion examples/http/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@

span.set_attribute('http.url', response.env.url.to_s)
span.set_attribute('http.status_code', response.status)
span.set_attribute('http.status_text', response.reason_phrase)
end
32 changes: 18 additions & 14 deletions instrumentation/excon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
# Release History: opentelemetry-instrumentation-excon

### Unreleased

* FIXED: Removed http.status_text attribute #750

### v0.17.0 / 2021-04-22

* ADDED: Excon instrumentation accepts peer service config attribute.
* FIXED: Refactor propagators to add #fields
* ADDED: Excon instrumentation accepts peer service config attribute.
* FIXED: Refactor propagators to add #fields

### v0.16.0 / 2021-03-17

* FIXED: Example scripts now reference local common lib
* DOCS: Replace Gitter with GitHub Discussions
* FIXED: Example scripts now reference local common lib
* DOCS: Replace Gitter with GitHub Discussions

### v0.15.0 / 2021-02-18

* (No significant changes)

### v0.14.0 / 2021-02-03

* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators

* ADDED: Replace getter and setter callables and remove rack specific propagators
* ADDED: Replace getter and setter callables and remove rack specific propagators

### v0.13.0 / 2021-01-29

Expand All @@ -30,29 +34,29 @@

### v0.11.0 / 2020-12-11

* FIXED: Copyright comments to not reference year
* FIXED: Copyright comments to not reference year

### v0.10.0 / 2020-12-03

* (No significant changes)

### v0.9.0 / 2020-11-27

* BREAKING CHANGE: Add timeout for force_flush and shutdown
* BREAKING CHANGE: Add timeout for force_flush and shutdown

* ADDED: Add timeout for force_flush and shutdown
* ADDED: Add timeout for force_flush and shutdown

### v0.8.0 / 2020-10-27

* BREAKING CHANGE: Move context/span methods to Trace module
* BREAKING CHANGE: Remove 'canonical' from status codes
* BREAKING CHANGE: Move context/span methods to Trace module
* BREAKING CHANGE: Remove 'canonical' from status codes

* FIXED: Move context/span methods to Trace module
* FIXED: Remove 'canonical' from status codes
* FIXED: Move context/span methods to Trace module
* FIXED: Remove 'canonical' from status codes

### v0.7.0 / 2020-10-07

* DOCS: Standardize toplevel docs structure and readme
* DOCS: Standardize toplevel docs structure and readme

### v0.6.0 / 2020-09-10

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def handle_response(datum) # rubocop:disable Metrics/AbcSize, Metrics/MethodLeng
if datum.key?(:response)
response = datum[:response]
span.set_attribute('http.status_code', response[:status])
span.set_attribute('http.status_text', response[:reason_phrase])
span.status = OpenTelemetry::Trace::Status.http_to_status(
response[:status]
)
Expand Down
30 changes: 17 additions & 13 deletions instrumentation/faraday/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
# Release History: opentelemetry-instrumentation-faraday

### Unreleased

* FIXED: Removed http.status_text attribute #750

### v0.17.0 / 2021-04-22

* FIXED: Fix Faraday gem dependencies.
* FIXED: Refactor propagators to add #fields
* FIXED: Fix Faraday gem dependencies.
* FIXED: Refactor propagators to add #fields

### v0.16.0 / 2021-03-17

* FIXED: Remove passwords from http.url
* FIXED: Example scripts now reference local common lib
* DOCS: Replace Gitter with GitHub Discussions
* FIXED: Remove passwords from http.url
* FIXED: Example scripts now reference local common lib
* DOCS: Replace Gitter with GitHub Discussions

### v0.15.0 / 2021-02-18

* FIXED: Include http.status_text only if reason_phrase is in the response
* FIXED: Include http.status_text only if reason_phrase is in the response

### v0.14.0 / 2021-02-03

* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators

* ADDED: Replace getter and setter callables and remove rack specific propagators
* ADDED: Replace getter and setter callables and remove rack specific propagators

### v0.13.0 / 2021-01-29

Expand All @@ -31,26 +35,26 @@

### v0.11.0 / 2020-12-11

* FIXED: Copyright comments to not reference year
* FIXED: Copyright comments to not reference year

### v0.10.0 / 2020-12-03

* (No significant changes)

### v0.9.0 / 2020-11-27

* BREAKING CHANGE: Add timeout for force_flush and shutdown
* BREAKING CHANGE: Add timeout for force_flush and shutdown

* ADDED: Add timeout for force_flush and shutdown
* ADDED: Add timeout for force_flush and shutdown

### v0.8.0 / 2020-10-27

* (No significant changes)

### v0.7.0 / 2020-10-07

* DOCS: Faraday documentation
* DOCS: Standardize toplevel docs structure and readme
* DOCS: Faraday documentation
* DOCS: Standardize toplevel docs structure and readme

### v0.6.0 / 2020-09-10

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def tracer

def trace_response(span, response)
span.set_attribute('http.status_code', response.status)
span.set_attribute('http.status_text', response.reason_phrase) if response.reason_phrase
span.status = OpenTelemetry::Trace::Status.http_to_status(
response.status
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,6 @@
)
end

it 'sets the reason phrase' do
stub_request(:any, 'example.com').to_return(status: [500, 'Internal Server Error'])
::Faraday.new('http://example.com').get('/')

_(span.attributes['http.status_text']).must_equal 'Internal Server Error'
end

it 'merges http client attributes' do
client_context_attrs = {
'test.attribute' => 'test.value', 'http.method' => 'OVERRIDE'
Expand Down
48 changes: 26 additions & 22 deletions instrumentation/rack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,73 @@
# Release History: opentelemetry-instrumentation-rack

### Unreleased

* FIXED: Removed http.status_text attribute #750

### v0.17.0 / 2021-04-22

* (No significant changes)

### v0.16.0 / 2021-03-17

* BREAKING CHANGE: Pass env to url quantization rack config to allow more flexibility
* BREAKING CHANGE: Pass env to url quantization rack config to allow more flexibility

* ADDED: Pass env to url quantization rack config to allow more flexibility
* ADDED: Add rack instrumentation config option to accept callable to filter requests to trace
* FIXED: Example scripts now reference local common lib
* DOCS: Replace Gitter with GitHub Discussions
* ADDED: Pass env to url quantization rack config to allow more flexibility
* ADDED: Add rack instrumentation config option to accept callable to filter requests to trace
* FIXED: Example scripts now reference local common lib
* DOCS: Replace Gitter with GitHub Discussions

### v0.15.0 / 2021-02-18

* ADDED: Add instrumentation config validation
* ADDED: Add instrumentation config validation

### v0.14.0 / 2021-02-03

* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators

* ADDED: Replace getter and setter callables and remove rack specific propagators
* ADDED: Add untraced endpoints config to rack middleware
* ADDED: Replace getter and setter callables and remove rack specific propagators
* ADDED: Add untraced endpoints config to rack middleware

### v0.13.0 / 2021-01-29

* FIXED: Only include user agent when present
* FIXED: Only include user agent when present

### v0.12.0 / 2020-12-24

* (No significant changes)

### v0.11.0 / 2020-12-11

* FIXED: Copyright comments to not reference year
* FIXED: Copyright comments to not reference year

### v0.10.1 / 2020-12-09

* FIXED: Rack current_span
* FIXED: Rack current_span

### v0.10.0 / 2020-12-03

* (No significant changes)

### v0.9.0 / 2020-11-27

* BREAKING CHANGE: Add timeout for force_flush and shutdown
* BREAKING CHANGE: Add timeout for force_flush and shutdown

* ADDED: Instrument rails
* ADDED: Add timeout for force_flush and shutdown
* ADDED: Instrument rails
* ADDED: Add timeout for force_flush and shutdown

### v0.8.0 / 2020-10-27

* BREAKING CHANGE: Move context/span methods to Trace module
* BREAKING CHANGE: Remove 'canonical' from status codes
* BREAKING CHANGE: Move context/span methods to Trace module
* BREAKING CHANGE: Remove 'canonical' from status codes

* FIXED: Move context/span methods to Trace module
* FIXED: Remove 'canonical' from status codes
* FIXED: Move context/span methods to Trace module
* FIXED: Remove 'canonical' from status codes

### v0.7.0 / 2020-10-07

* FIXED: Remove superfluous file from Rack gem
* DOCS: Added README for Rack Instrumentation
* DOCS: Standardize toplevel docs structure and readme
* FIXED: Remove superfluous file from Rack gem
* DOCS: Added README for Rack Instrumentation
* DOCS: Standardize toplevel docs structure and readme

### v0.6.0 / 2020-09-10

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ def set_attributes_after_request(span, status, headers, _response)
# NOTE: if data is available, it would be good to do this:
# set_attribute('http.route', ...
# e.g., "/users/:userID?
span.set_attribute('http.status_text', ::Rack::Utils::HTTP_STATUS_CODES[status])

allowed_response_headers(headers).each { |k, v| span.set_attribute(k, v) }
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
it 'records attributes' do
_(first_span.attributes['http.method']).must_equal 'GET'
_(first_span.attributes['http.status_code']).must_equal 200
_(first_span.attributes['http.status_text']).must_equal 'OK'
_(first_span.attributes['http.target']).must_equal '/'
_(first_span.status.code).must_equal OpenTelemetry::Trace::Status::OK
_(first_span.attributes['http.url']).must_be_nil
Expand Down
30 changes: 17 additions & 13 deletions instrumentation/restclient/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
# Release History: opentelemetry-instrumentation-restclient

### Unreleased

* FIXED: Removed http.status_text attribute #750

### v0.17.0 / 2021-04-22

* ADDED: RestClient instrumentation accepts peer service config attribute.
* FIXED: Refactor propagators to add #fields
* ADDED: RestClient instrumentation accepts peer service config attribute.
* FIXED: Refactor propagators to add #fields

### v0.16.0 / 2021-03-17

* FIXED: Remove passwords from http.url
* FIXED: Example scripts now reference local common lib
* DOCS: Replace Gitter with GitHub Discussions
* FIXED: Remove passwords from http.url
* FIXED: Example scripts now reference local common lib
* DOCS: Replace Gitter with GitHub Discussions

### v0.15.0 / 2021-02-18

* (No significant changes)

### v0.14.0 / 2021-02-03

* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators

* ADDED: Replace getter and setter callables and remove rack specific propagators
* ADDED: Replace getter and setter callables and remove rack specific propagators

### v0.13.0 / 2021-01-29

Expand All @@ -31,27 +35,27 @@

### v0.11.0 / 2020-12-11

* FIXED: Copyright comments to not reference year
* FIXED: Copyright comments to not reference year

### v0.10.0 / 2020-12-03

* (No significant changes)

### v0.9.0 / 2020-11-27

* BREAKING CHANGE: Add timeout for force_flush and shutdown
* BREAKING CHANGE: Add timeout for force_flush and shutdown

* ADDED: Add timeout for force_flush and shutdown
* ADDED: Add timeout for force_flush and shutdown

### v0.8.0 / 2020-10-27

* BREAKING CHANGE: Move context/span methods to Trace module
* BREAKING CHANGE: Move context/span methods to Trace module

* FIXED: Move context/span methods to Trace module
* FIXED: Move context/span methods to Trace module

### v0.7.0 / 2020-10-07

* DOCS: Standardize toplevel docs structure and readme
* DOCS: Standardize toplevel docs structure and readme

### v0.6.0 / 2020-09-10

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def trace_request # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
# If so, add additional attributes.
if response.is_a?(::RestClient::Response)
span.set_attribute('http.status_code', response.code)
span.set_attribute('http.status_text', ::RestClient::STATUSES[response.code])
span.status = OpenTelemetry::Trace::Status.http_to_status(
response.code
)
Expand Down
Loading