Description
WriteLogEntries and ListLogEntries (LoggingServiceV2) work correctly, but
ConfigServiceV2 (CreateSink, ListSinks, UpdateSink, DeleteSink) returns
UNIMPLEMENTED:
grpc._channel._InactiveRpcError:
status = StatusCode.UNIMPLEMENTED
details = "Method not found: google.logging.v2.ConfigServiceV2/CreateSink"
Why this matters
Log sinks (routing logs to GCS/Pub/Sub/BigQuery destinations) are a core
part of the Cloud Logging workflow, especially for local testing of
"logs -> sink -> bucket" pipelines used with GKE workloads. Right now
there's no way to exercise this against floci-gcp — I had to build a
polling workaround (list entries + manually copy matches to GCS) just
to approximate the behavior for a training exercise.
Repro
- docker run -d -p 4588:4588 floci/floci-gcp:latest
- Use ConfigServiceV2Client with an insecure grpc channel to localhost:4588
- Call create_sink(parent="projects/", sink=LogSink(...))
- Observe UNIMPLEMENTED
Proposed scope (minimum viable)
- CreateSink / GetSink / ListSinks / DeleteSink for GCS destinations first
(Pub/Sub destinations as a fast-follow, since Pub/Sub is already emulated)
- On WriteLogEntries, evaluate active sinks' filters and copy matching
entries to the destination bucket as JSON objects, mirroring real
Cloud Logging's export behavior
- writer_identity can be a stub service account string, consistent with
how IAM/SignBlob already returns stub values elsewhere in the project
Willing to contribute
I'd like to attempt a PR for this myself if a maintainer can point me at
the right place to start (I'm assuming this lives alongside the existing
LoggingServiceV2 implementation — happy to be pointed elsewhere). I'm
comfortable with Java but new to this codebase, so any guidance on the
module/package structure for gRPC services would help me get started
faster.
Environment
floci-gcp: latest (docker)
Client: google-cloud-logging (Python) via ConfigServiceV2GrpcTransport
Description
WriteLogEntriesandListLogEntries(LoggingServiceV2) work correctly, butConfigServiceV2(CreateSink, ListSinks, UpdateSink, DeleteSink) returnsUNIMPLEMENTED:
Why this matters
Log sinks (routing logs to GCS/Pub/Sub/BigQuery destinations) are a core
part of the Cloud Logging workflow, especially for local testing of
"logs -> sink -> bucket" pipelines used with GKE workloads. Right now
there's no way to exercise this against floci-gcp — I had to build a
polling workaround (list entries + manually copy matches to GCS) just
to approximate the behavior for a training exercise.
Repro
Proposed scope (minimum viable)
(Pub/Sub destinations as a fast-follow, since Pub/Sub is already emulated)
entries to the destination bucket as JSON objects, mirroring real
Cloud Logging's export behavior
how IAM/SignBlob already returns stub values elsewhere in the project
Willing to contribute
I'd like to attempt a PR for this myself if a maintainer can point me at
the right place to start (I'm assuming this lives alongside the existing
LoggingServiceV2 implementation — happy to be pointed elsewhere). I'm
comfortable with Java but new to this codebase, so any guidance on the
module/package structure for gRPC services would help me get started
faster.
Environment
floci-gcp: latest (docker)
Client: google-cloud-logging (Python) via ConfigServiceV2GrpcTransport