Giter Club home page Giter Club logo

messenger-newrelic's Introduction

Symfony messenger newrelic middleware

Because symfony messenger creates a long running process, newrelic needs to be notified for each message that is processed.

This package provides a middleware and a command listener that handles this for you.

Installation

Require it with composer

composer require arxus/messenger-newrelic

Then add the middleware to your messenger bus middlewares:

framework:
    messenger:
        buses:
            default:
                middleware:
                    - Arxus\NewrelicMessengerBundle\Middleware\NewRelicMiddleware

Expected results

When newrelic is correctly installed and configured on your host, it should report each consumed message as a separate transaction, using the message name as the transaction name.

messenger-newrelic's People

Contributors

arxedwinbastiaens avatar janvernieuwe avatar jvocampings avatar rvanlaak avatar syrm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

messenger-newrelic's Issues

More strictly follow PSR-4 autoloading namespaces

Although things work okay in production, and tests are not failing, the PSR-4 autoloading throws warnings on attempts to loading the test classes:

image

The reason for this is that src folders are in the root, and tests are located under the tests folder.

What about

  1. moving source files to an actual /src folder, and
  2. update the non-dev autoload section accordingly in composer.json

newrelicTransactionName property in serialized message

Hi,

I've been using your bundle and used the NameableNewrelicTransactionInterface to customize the transaction names in NewRelic dashboard, for my different message classes. Now, when I'm using the symfony/serializer I have a newrelicTransactionName property that is added to the stringified messag, which is unintended I think.

A quick fix that I found is to add a serialization configuration to my app like this one :

# config/serialization/packages/NameableNewrelicTransactionInterface.yaml
Arxus\NewrelicMessengerBundle\Newrelic\NameableNewrelicTransactionInterface:
    attributes:
        newrelicTransactionName:
            ignore: true

But I think it would be better to let the bundle itself handle it, with a configurable option for example.

Let me know what you think.

Cheers !

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.