{"id":13745928,"url":"https://github.com/openzipkin/zipkin-gcp","last_synced_at":"2025-04-12T15:40:57.134Z","repository":{"id":12964629,"uuid":"72462669","full_name":"openzipkin/zipkin-gcp","owner":"openzipkin","description":"Reporters and collectors for use in Google Cloud Platform","archived":false,"fork":false,"pushed_at":"2024-04-16T19:27:08.000Z","size":1144,"stargazers_count":88,"open_issues_count":17,"forks_count":59,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-04-21T12:37:04.153Z","etag":null,"topics":["openzipkin"],"latest_commit_sha":null,"homepage":"https://cloud.google.com/trace/docs/zipkin","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openzipkin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-31T17:49:53.000Z","updated_at":"2024-06-23T06:09:02.766Z","dependencies_parsed_at":"2023-12-18T00:48:19.663Z","dependency_job_id":"3aee6083-1c15-4bef-a1d1-510a765ed8f0","html_url":"https://github.com/openzipkin/zipkin-gcp","commit_stats":null,"previous_names":["googlecloudplatform/stackdriver-zipkin"],"tags_count":76,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzipkin%2Fzipkin-gcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzipkin%2Fzipkin-gcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzipkin%2Fzipkin-gcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzipkin%2Fzipkin-gcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openzipkin","download_url":"https://codeload.github.com/openzipkin/zipkin-gcp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248590798,"owners_count":21129891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["openzipkin"],"created_at":"2024-08-03T06:00:40.772Z","updated_at":"2025-04-12T15:40:57.115Z","avatar_url":"https://github.com/openzipkin.png","language":"Java","funding_links":[],"categories":["Management Tools"],"sub_categories":["StackDriver"],"readme":"[![Gitter chat](http://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](https://gitter.im/openzipkin/zipkin)\n[![Build Status](https://github.com/openzipkin/zipkin-gcp/workflows/test/badge.svg)](https://github.com/openzipkin/zipkin-gcp/actions?query=workflow%3Atest)\n[![Maven Central](https://img.shields.io/maven-central/v/io.zipkin.gcp/zipkin-module-gcp.svg)](https://search.maven.org/search?q=g:io.zipkin.gcp%20AND%20a:zipkin-module-gcp)\n\n# zipkin-gcp\nShared libraries that provide Zipkin integration with the Google Cloud Platform. Requires JRE 17 or later.\n\n# Usage\nThese components integrate traced applications and servers through Google Cloud services\nvia interfaces defined in [Zipkin](https://github.com/openzipkin/zipkin)\nand [zipkin-reporter-java](https://github.com/openzipkin/zipkin-reporter-java).\n\n## Senders\nThe component in a traced application that sends timing data (spans)\nout of process is called a Sender. Senders are called on interval by an\n[async reporter](https://github.com/openzipkin/zipkin-reporter-java#asyncreporter).\n\nNOTE: Applications can be written in any language, while we currently\nonly have senders in Java, senders in other languages are welcome.\n\n| Sender                                    | Description                 |\n|-------------------------------------------|-----------------------------|\n| [Stackdriver Trace](./sender-stackdriver) | Free cloud service provider |\n\n### Encoders\n\nEncoding is library-specific, as some libraries use `zipkin2.Span` and others\n`brave.handler.MutableSpan`. Both options are available to encode to the\nStackDriver Trave V2 format.\n\n| Encoder                                                 | Description                                    |\n|---------------------------------------------------------|------------------------------------------------|\n| [`StackdriverEncoder.V2`](./encoder-stackdriver-zipkin) | zipkin-reporter `AsyncReporter\u003cSpan\u003e`          |\n| [`StackdriverV2Encoder`](./encoder-stackdriver-brave)   | zipkin-reporter-brave `AsyncZipkinSpanHandler` |\n\n## Collectors\nThe component in a zipkin server that receives trace data is called a\ncollector. This decodes spans reported by applications and persists them\nto a configured storage component.\n\n| Collector | Description |\n|-----------|-------------|\n\n## Storage\nThe component in a zipkin server that persists and queries collected\ndata is called `StorageComponent`. This primarily supports the Zipkin\nApi and all collector components.\n\n| Storage                                    | Description                 |\n|--------------------------------------------|-----------------------------|\n| [Stackdriver Trace](./storage-stackdriver) | Free cloud service provider |\n\n## Server integration\nIn order to integrate with zipkin-server, you need to use properties\nlauncher to load your collector (or sender) alongside the zipkin-server\nprocess.\n\nTo integrate a module with a Zipkin server, you need to:\n* add a module jar to the `loader.path`\n* enable the profile associated with that module\n* launch Zipkin with `PropertiesLauncher`\n\nEach module will also have different minimum variables that need to be set.\n\nEx.\n```\n$ curl -sSL https://zipkin.io/quickstart.sh | bash -s\n$ curl -sSL https://zipkin.io/quickstart.sh | bash -s io.zipkin.gcp:zipkin-module-gcp:LATEST:module gcp.jar\n$ STORAGE_TYPE=stackdriver STACKDRIVER_PROJECT_ID=zipkin-demo \\\n    java \\\n    -Dloader.path='gcp.jar,gcp.jar!/lib' \\\n    -Dspring.profiles.active=gcp \\\n    -cp zipkin.jar \\\n    org.springframework.boot.loader.launch.PropertiesLauncher\n```\n\n## Example integrating Stackdriver Storage\n\nIf you cannot use our [Docker image](./docker/README.md), you can still integrate\nyourself by downloading a couple jars.\n\n[Here's an example](module/README.md#quick-start) of\nintegrating Stackdriver storage.\n\n## Troubleshooting\n\n### Translation issues\n\nWhen using a component that sends data to Stackdriver, if you see nothing in the console,\ntry enabling DEBUG logging on the translation component. If using Spring Boot (ex normal\napp or zipkin server integration), add the following system property:\n\n```\n-Dlogging.level.zipkin2=DEBUG\n```\n\nNote: If using our docker image or anything that uses JAVA_OPTS, you can add this there.\n\nWith this in place, you'll see the input and output of translation like below. Keep a copy\nof this when contacting us on [gitter](https://gitter.im/openzipkin/zipkin) for support.\n\n```\n2018-04-09 13:58:44.112 DEBUG [/] 11325 --- [   XNIO-2 I/O-3] z.t.stackdriver.SpanTranslator           : \u003e\u003e translating zipkin span: {\"traceId\":\"d42316227862f939\",\"parentId\":\"d42316227862f939\",\"id\":\"dfbb21f9cf4c52b3\",\"kind\":\"CLIENT\",\"name\":\"get\",\"timestamp\":1523253523054380,\"duration\":4536,\"localEndpoint\":{\"serviceName\":\"frontend\",\"ipv4\":\"192.168.1.113\"},\"tags\":{\"http.method\":\"GET\",\"http.path\":\"/api\"}}\n2018-04-09 13:58:44.113 DEBUG [/] 11325 --- [   XNIO-2 I/O-3] z.t.stackdriver.SpanTranslator           : \u003c\u003c translated to stackdriver span: span_id: 16199746076534411288\nkind: RPC_CLIENT\nname: \"get\"\nstart_time {\n  seconds: 1523253523\n  nanos: 54380000\n}\nend_time {\n  seconds: 1523253523\n  nanos: 58916000\n}\nparent_span_id: 15286085897530046777\nlabels {\n  key: \"/http/method\"\n  value: \"GET\"\n}\nlabels {\n  key: \"zipkin.io/http.path\"\n  value: \"/api\"\n}\nlabels {\n  key: \"/component\"\n  value: \"frontend\"\n}\n```\n\n### Healthcheck API\n\nIf you are running Zipkin server, `/health` HTTP endpoint can be used to check service health.\n\n### gRPC Headers\n\nIf you suspect an issue between Zipkin server and Stackdriver, inspecting gRPC headers may be useful.\nSet `STACKDRIVER_HTTP_LOGGING` environment variable to `HEADERS` to log gRPC status information.\n\n### GCP console\n\nIf you believe that spans are reaching Stackdriver, verify what happens to them from the GCP side by visiting APIs \u0026 Services \u003e Dashboard \u003e Stackdriver Trace API \u003e Metrics section.\n\n* Is there any traffic at all? If not, then the requests are likely not reaching Stackdriver at all. Check your applications/proxies to make sure requests go to the right place.\n* Are there errors? If so, narrow down the source of errors by selecting specific Credentials and Methods values from the filter drop-downs on top and seeing the effect in \"Errors by API method\" chart or \"Methods\" table.\n    * If all writes are failing, check that your service account has access to `cloudtrace.agent` role or `cloudtrace.traces.patch` permission.\n    * If reads are failing, check for `cloudtrace.user` role or the specific permission (full permissions list).\nNOTE: read and write permissions are separate; only the admin role has both.\n\n## Artifacts\nAll artifacts publish to the group ID \"io.zipkin.gcp\". We use a common\nrelease version for all components.\n\n### Library Releases\nReleases are at [Sonatype](https://oss.sonatype.org/content/repositories/releases) and  [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.zipkin.gcp%22)\n\n### Library Snapshots\nSnapshots are uploaded to [Sonatype](https://oss.sonatype.org/content/repositories/snapshots) after\ncommits to master.\n\n### Docker Images\nReleased versions of zipkin-gcp are published to Docker Hub as `openzipkin/zipkin-gcp`\nand GitHub Container Registry as `ghcr.io/openzipkin/zipkin-gcp`.\n\nSee [docker](./docker) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenzipkin%2Fzipkin-gcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenzipkin%2Fzipkin-gcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenzipkin%2Fzipkin-gcp/lists"}