Analytics: updateEventIfRequired mutates the shared ext.prebid.analytics node
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 71/100
Línea de trabajo
Read AnalyticsReporterDelegator.java, especially updateAuctionContext at the linked lines, and trace how prepareAnalytics handles reporters without an analytics entry. Reproduce the AMP or video case with two reporters and account module config, then check that each reporter receives its own analytics node and the original request remains unchanged.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
🤖 This issue was written by an AI agent (Claude Code) on behalf of @patmmccann.
What happens
updateEventIfRequired → updateAuctionContext merges the account's analytics.modules.<reporter> config into ext.prebid.analytics.<reporter> for each reporter, but it writes into the request's existing JsonNode objects instead of copies:
adapterNodeis the liveanalyticsNode.get(adapterName)when it exists, andadapterNode.set(...)adds the account fields to it.((ObjectNode) analyticsNode).set(adapterName, adapterNode)changes the sharedext.prebid.analyticsobject.
The new BidRequest/AuctionContext built afterwards still points to the same, now changed, node.
Which node is shared:
- AMP and video events: always the original request's node, because they aren't trimmed per reporter (see https://github.com/prebid/prebid-server-java/issues/4715).
- Auction events: the original node for any reporter that has no entry in
ext.prebid.analytics, becauseprepareAnalyticsreturnsnulland the originalextis kept (L324-L350). It is also the original node forlogAnalytics, which is exempt from trimming.
Reporters run one after another through vertx.runOnContext. So when a reporter that shares the node runs after another reporter's config was merged into it, it sees the earlier reporter's account-level module config under the earlier reporter's key.
Why it matters
Account-level analytics module config (e.g. per-publisher keys or scope IDs for a reporter) could end up visible to other reporters. Which reporters see it depends on reporter order. Changing the request in place from inside the analytics path is also fragile if anything else reads the request afterwards.
To reproduce
Two reporters enabled, e.g. pubstack and greenbids. Account config:
{ "analytics": { "modules": { "pubstack": { "key1": "a" }, "greenbids": { "key2": "b" } } } }
An AMP (via stored request) or video request with "ext": {"prebid": {"analytics": {"pubstack": {}, "greenbids": {}}}}: the reporter that runs second sees the other reporter's merged account fields in ext.prebid.analytics.
Expected behaviour
Each reporter gets its own copy of ext.prebid.analytics (ideally trimmed to its own entry), and the request object isn't changed.
Suggested fix
Work on analyticsNode.deepCopy() (and a copy of the adapter node) in updateAuctionContext, and build the new ExtRequestPrebid from that copy.
References
- Found while documenting PBS analytics events: https://github.com/prebid/prebid.github.io/pull/6997
🤖 Generated with Claude Code
- Lenguaje dominante
- Java
- Estrellas
- 108
- Forks
- 258
- Merge medio
- 3 d 20 h
- PR fusionados (30 d)
- 12
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de prebid/prebid-server-java
-
auto
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
prebid/prebid-server-java#4721 ·
Los mantenedores suelen responder en 2 días
-
Port PR from PBS-Go: Beachfront: Fix for Off-by-one comparison against lengthPosiblemente ocupada @osulzhenko la tomó hace 2 días. Abiertoauto
Dificultad 2/5 1-3 horas Aptitud para principiantes 53/100
prebid/prebid-server-java#4720 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
auto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
prebid/prebid-server-java#4719 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
prebid/prebid-server-java#4718 ·
Los mantenedores suelen responder en 2 días
-
Analytics: cookie_sync and setuid events ignore analytics.global.adapters and account enabled flagAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
prebid/prebid-server-java#4717 ·
Los mantenedores suelen responder en 2 días
Todos los issues de prebid/prebid-server-java
Issues similares
-
good first issue java test
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 2 días
-
InterfaceMemberImpliedModifier: records and annotation types nested in interfaces are not checkedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
checkstyle/checkstyle#23007 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/logging-log4j2#4519 ·
Los mantenedores suelen responder en 3 días
-
Vinyl Cache 9.1 is now LTSAbiertobug
Dificultad 1/5 1-3 horas Aptitud para principiantes 70/100
endoflife-date/endoflife.date#11679 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug finsim-cli low
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día