Log why an event was dropped - #46
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## fix/24-non-website-events #46 +/- ##
===============================================================
+ Coverage 69.85% 76.70% +6.84%
- Complexity 137 139 +2
===============================================================
Files 30 30
Lines 418 455 +37
===============================================================
+ Hits 292 349 +57
+ Misses 126 106 -20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
loevgaard
force-pushed
the
fix/24-non-website-events
branch
from
September 7, 2026 12:03
adf67ff to
3437c5c
Compare
loevgaard
force-pushed
the
fix/25-log-dropped-events
branch
from
September 7, 2026 12:03
a0c147e to
324e9e7
Compare
loevgaard
force-pushed
the
fix/24-non-website-events
branch
from
September 7, 2026 12:18
3437c5c to
ee77aa5
Compare
loevgaard
force-pushed
the
fix/25-log-dropped-events
branch
2 times, most recently
from
September 7, 2026 12:46
1ed2b29 to
37e9af9
Compare
Four filters and three consent gates discarded events silently, which made 'my events do not show up' impossible to answer without a debugger. Each now logs the reason at debug level on a dedicated Monolog channel. Fixes #25
loevgaard
force-pushed
the
fix/25-log-dropped-events
branch
from
September 7, 2026 12:51
37e9af9 to
919b3dd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #25
Problem
Four subscribers stopped propagation and three returned early on consent, and not one of them logged anything. "My events do not show up in Events Manager" is the first thing every integrator hits, and the only way to answer it was to step through the event dispatcher with a debugger.
Change
Each of these now logs at debug level with the event name and event id in the context:
FilterBotsSubscriberFilterConfiguredUserAgentsSubscriberfilters.user_agentFilterEmptyUserAgentSubscriberStopPropagationIfNoPixelsHasBeenAddedSubscriberAddEventToTagBagSubscriberAddLibraryToTagBagSubscriberDispatchOnCommandBusSubscriberThe logger is optional in every constructor and falls back to
NullLogger, and each service is wired withon-invalid="null"plus<tag name="monolog.logger" channel="setono_meta_conversions_api"/>, so the channel can be turned up on its own without touching the application log.README.mdshows the Monolog handler for it.Drive-by in the same file:
AddLibraryToTagBagSubscriberhadon-invalid="null"on itsConsentCheckerInterfaceargument while the constructor requires a non-null value. That service always exists, so it never bit, but it would have been aTypeErrorrather than a clear container error if it ever went missing.Tests
A
SpyLoggertest double records what was logged. Each filter asserts it logs exactly one debug record naming the reason, and the bot filter also asserts nothing is logged when the event passes.StopPropagationIfNoPixelsHasBeenAddedSubscribergets its first tests.