Coder Social home page Coder Social logo

Comments (5)

jkraemer avatar jkraemer commented on May 24, 2024 1

Thanks for the idea with the filter, that's what I implemented now as the default way to configure this. notice[:redmine] didn't work though, I chose notice[:context][:redmine_config].

Greetings from the Philippines :)

from redmine_airbrake.

jkraemer avatar jkraemer commented on May 24, 2024

Hi :)

I think the proper solution would be to handle this case and grab the serialized data (aka project key) from the Authorization header if no key param is present. I'm not sure about potential length limits in http headers but if we're lucky we can continue abusing this value as we did before.

I can have a look at that but almost certainly not before Christmas...

Cheers!

from redmine_airbrake.

jkraemer avatar jkraemer commented on May 24, 2024

On a sidenote - why you cannot simply use a slightly older version of airbrake-ruby? :)

from redmine_airbrake.

aiomaster avatar aiomaster commented on May 24, 2024

Yeah, just use an older version is an option, but I am not a friend of this, cause you shift the problem to the future when you have to upgrade, cause some other dependencies forces you.

I just don't understand why there is this abuse of the project_key and maybe there could be a better option to provide additional information to the request.
If it could be part of the json request body there would be no potential length limits like in HTTP headers and it could get parsed with the rest of the body, so we don't need to mess around with CGI.escape and that stuff. The downside is, that a change in airbrake-ruby is required and we need a custom key that is not used in the rest of the airbrake json schema. Maybe the key could be configurable.

from redmine_airbrake.

aiomaster avatar aiomaster commented on May 24, 2024

Hi @jkraemer,
maybe it could be a lot easier to include the additional redmine parameters in the json body of the notice.
We could for example do the following in our airbrake initializer:

Airbrake.add_filter do |notice|
  notice[:redmine] = {
    tracker: 'Exception',
    api_key: 'foo',
    project: 'bar',
    assigned_to: 'developer'
  }
end

Then we have to extract the config information after parsing the request body. This seems like a clean solution to me. What do you think? Should I make a PR for this?

from redmine_airbrake.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.