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

Rails Content-Type header without modification deprecation warning #2500

Closed
internethostage opened this issue Mar 11, 2024 · 3 comments
Closed
Labels
bug community To tag external issues and PRs submitted by the community

Comments

@internethostage
Copy link

Description

We noticed an incredible amount of deprecation warnings related to this content_type behaviour change:
https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#actiondispatch-request-content-type-now-returns-content-type-header-as-it-is

This is triggered by the query to content_type done on the agent (link to relevant code)

Expected Behavior

This is not necessarily a bug, the deprecation warning is mostly a heads up.
Why I bring up this issue is to ensure that this change won't affect the new relic gem, and so that I can safely add this warning to our ignore list.

Troubleshooting or NR Diag results

Provide any other relevant log data.
TIP: Scrub logs and diagnostic information for sensitive information

Steps to Reproduce

On a rails 7.0 app, any request with the agent active should display this deprecation warning.

Your Environment

ruby 3.2.2
rails 7.0.8
newrelic_rpm 8.14

Additional context

https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#actiondispatch-request-content-type-now-returns-content-type-header-as-it-is

For Maintainers Only or Hero Triaging this bug

Suggested Priority (P1,P2,P3,P4,P5):
Suggested T-Shirt size (S, M, L, XL, Unknown):

@workato-integration
Copy link

@github-actions github-actions bot added the community To tag external issues and PRs submitted by the community label Mar 11, 2024
@hannahramadan
Copy link
Contributor

Hi @internethostage—thank you for the heads up! We will explore how this change affects the agent and get back to you.

@hannahramadan
Copy link
Contributor

hannahramadan commented Mar 13, 2024

@internethostage It looks like this was a change Rails made in major version 7 (listed in their upgrade guide 6.1 to 7), and its quite a change so it makes sense why they're being loud with warnings!

This doesn't impact the Ruby agent in a breaking way. You can safely add this warning to your ignore list.

Where we previously reported content type as 'text/csv', for example, we now report something like 'text/csv;header=present;charset=utf-16'. This isn't how we want to represent content type, so we will have to make that update on our end (#2506). I'm going to close this issue, but feel free to reopen should anything else come up. Thanks again for bringing this to our attention!

@github-project-automation github-project-automation bot moved this from Triage to Code Complete/Done in Ruby Engineering Board Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug community To tag external issues and PRs submitted by the community
Projects
Archived in project
Development

No branches or pull requests

2 participants