Write egress access stats to Data Acess V3 - #11
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an asynchronous Delta Lake writer for per-share egress access logs, allowing ACCESS_LOG telemetry to be persisted to per-tenant Delta tables (in addition to the existing JSON log stream) when configured.
Changes:
- Introduce
DeltaAccessLogWriterand wire it behindAccessLogEmitter.createvia a newCompositeAccessLogEmitter. - Add new
accessLoggingconfiguration fields (deltaTablePath,deltaFlushIntervalSeconds,deltaFlushBatchSize) across templates/manifests and document the behavior. - Ensure the writer is closed on JVM shutdown and add a dedicated test suite for the Delta writer.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| server/src/universal/conf/delta-sharing-server.yaml.template | Documents new access-log-to-Delta configuration knobs in the server YAML template. |
| server/src/test/scala/io/delta/sharing/server/telemetry/GcpPricingTierSuite.scala | Updates header year to satisfy the updated scalastyle header check. |
| server/src/test/scala/io/delta/sharing/server/telemetry/GcpIpRangeLookupSuite.scala | Updates header year to satisfy the updated scalastyle header check. |
| server/src/test/scala/io/delta/sharing/server/telemetry/DeltaAccessLogWriterSuite.scala | Adds test coverage for per-tenant Delta writing, partitioning, flush behavior, and schema checks. |
| server/src/test/scala/io/delta/sharing/server/telemetry/AccessLogEmitterSuite.scala | Adds tests for composite emitter creation and fan-out behavior. |
| server/src/main/scala/io/delta/sharing/server/telemetry/GcpPricingTier.scala | Updates header year to satisfy the updated scalastyle header check. |
| server/src/main/scala/io/delta/sharing/server/telemetry/GcpIpRangeLookup.scala | Updates header year to satisfy the updated scalastyle header check. |
| server/src/main/scala/io/delta/sharing/server/telemetry/DeltaAccessLogWriter.scala | New async, buffered per-tenant Delta writer implementation. |
| server/src/main/scala/io/delta/sharing/server/telemetry/AccessLogEmitter.scala | Adds close() default method, composite emitter, and conditional Delta writer wiring. |
| server/src/main/scala/io/delta/sharing/server/DeltaSharingService.scala | Registers a shutdown hook to close the access log emitter/writer. |
| server/src/main/scala/io/delta/sharing/server/config/ServerConfig.scala | Extends AccessLoggingConfig to include Delta writer configuration fields and defaults. |
| scalastyle-config.xml | Relax header check to allow any 20xx copyright year. |
| manifests/zing-preview/configmap.yaml | Enables deltaTablePath for the zing-preview environment. |
| manifests/zcloud-prod3/configmap.yaml | Enables deltaTablePath for the zcloud-prod3 environment. |
| manifests/zcloud-prod2/configmap.yaml | Enables deltaTablePath for the zcloud-prod2 environment. |
| manifests/zcloud-prod/configmap.yaml | Enables deltaTablePath for the zcloud-prod environment. |
| manifests/base/configmap.yaml | Enables deltaTablePath for the base (dev) environment. |
| docs/PER_SHARE_EGRESS_MONITORING.md | Documents Delta storage behavior, naming, partitioning, and configuration. |
Comments suppressed due to low confidence (1)
server/src/main/scala/io/delta/sharing/server/config/ServerConfig.scala:182
deltaFlushBatchSizeanddeltaFlushIntervalSecondsare user-configurable but not validated. In particular,deltaFlushBatchSize <= 0will causequeue.drainTo(batch, flushBatchSize - 1)to throwIllegalArgumentException, breaking the background flush loop.
override def checkConfig(): Unit = {
// No required fields to validate
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bharatZen
requested changes
Jun 12, 2026
Merteg
force-pushed
the
ZING-43895
branch
2 times, most recently
from
June 12, 2026 12:25
cdee586 to
72b5df8
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
server/src/main/scala/io/delta/sharing/server/config/ServerConfig.scala:182
AccessLoggingConfig.checkConfig()is currently a no-op, but the new Delta writer settings can be misconfigured (e.g.,deltaFlushIntervalSeconds <= 0ordeltaFlushBatchSize <= 0). Those values will lead to runtime errors (negative drainTo limit / invalidgrouped()size) and repeated error logs.
override def checkConfig(): Unit = {
// No required fields to validate
}
Copilot stopped work on behalf of
Merteg due to an error
June 12, 2026 13:07
Merteg
force-pushed
the
ZING-43895
branch
2 times, most recently
from
June 12, 2026 13:32
69c575f to
2fdc403
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.
No description provided.