Add IntentIQ Identity Module - #4915
Open
ykholm wants to merge 1 commit into
Open
Conversation
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.
Summary
Adds a new host module,
intentiq.identity— a Go port of the prebid-server-javaextra/modules/intentiq-identitymodule. It enriches OpenRTB requests withIntentIQ-resolved identity and, optionally, reports winning bids to IntentIQ.
What it does
processed_auction_request— calls the IntentIQ Bid Enhancement S2S API(
ProfilesEngineServlet) and merges the resolved eids intouser.eidsbefore therequest reaches bidders. Fail-open: any resolution error leaves the request untouched.
auction_response(optional) — fire-and-forget impression report of each winningbid to the configured
reports_endpoint. The bid response is never modified.a shared L2. Three L2 providers: Redis, Valkey, Aerospike. Includes multi-key
aliasing with back-fill, negative caching, and in-progress dedup of concurrent
resolutions.
trace_enabled) — emits the full flow trace(cache result and layer, S2S latency and status, eids added) into
ext.trace.iiq-identityfor requests that sendext.prebid.debug.moduledeps.ModuleDeps.MetricsRegistererand exported on the server's existing/metricsendpoint.partner_idandtimeoutcan be overridden per account;cache and metrics settings are host-global.
Framework changes
Hook modules are built before the metrics engine (which needs
moduleStageNamesfromthat build), so a module's collectors cannot go into the core Prometheus registry. These
four changes give modules a dedicated registry that the existing scrape handler also
gathers from:
modules/moduledeps— newMetricsRegisterer prometheus.Registererfield. Nil-safe: amodule treats a nil registerer as a no-op.
router/router.go— creates the module registry, but only when the Prometheus listenerwill actually run (
metrics.prometheus.port != 0).metrics/config/metrics.go— carries the gatherer onDetailedMetricsEngine.server/prometheus.go— servesprometheus.Gatherers{core, modules}.modules/builder.go— registersintentiq.identity.Config & docs
modules/intentiq/identity/README.md— overview, setup/execution plan, parameters,caching and all three L2 backends, impression reporting, tracing, metrics, demo.
sample/002_intentiq_identity/— runnable sample (app.yaml,request.json,stored_response.json) wired intosample/docker-compose.ymlalongside a Valkeyservice, per the existing
sample/convention.Testing
normalization, the two-layer cache (miniredis for Redis; test doubles for Valkey and
Aerospike), metrics, config merge, builder/shutdown, and tracing.
go build ./...,go vet ./..., and gofmt clean../validate.sh --nofmt --cov --race 10passes. Module tests also pass under
go test -race.valkey 100%, memory 89.1%, redis 85.7%, enrichment 93.8%, metrics 94.4%.