{"id":21180190,"url":"https://github.com/hypnoce/opentracing-p6spy","last_synced_at":"2025-12-31T14:45:25.036Z","repository":{"id":95050295,"uuid":"103747217","full_name":"hypnoce/opentracing-p6spy","owner":"hypnoce","description":"OpenTracing Instrumentation for P6Spy","archived":false,"fork":false,"pushed_at":"2017-09-28T20:46:58.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T19:18:11.705Z","etag":null,"topics":["jdbc","opentracing","p6spy"],"latest_commit_sha":null,"homepage":"","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/hypnoce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-16T11:30:16.000Z","updated_at":"2017-09-25T23:50:05.000Z","dependencies_parsed_at":"2023-03-13T16:54:16.360Z","dependency_job_id":null,"html_url":"https://github.com/hypnoce/opentracing-p6spy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hypnoce/opentracing-p6spy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypnoce%2Fopentracing-p6spy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypnoce%2Fopentracing-p6spy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypnoce%2Fopentracing-p6spy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypnoce%2Fopentracing-p6spy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hypnoce","download_url":"https://codeload.github.com/hypnoce/opentracing-p6spy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypnoce%2Fopentracing-p6spy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265810358,"owners_count":23831949,"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":["jdbc","opentracing","p6spy"],"created_at":"2024-11-20T17:37:08.546Z","updated_at":"2025-12-31T14:45:25.011Z","avatar_url":"https://github.com/hypnoce.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/hypnoce/opentracing-p6spy.svg?branch=master)](https://travis-ci.org/hypnoce/opentracing-p6spy)\n\n# opentracing-p6spy\nOpenTracing instrumentation for p6spy\n\n## Installation\n\npom.xml\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.opentracing.contrib\u003c/groupId\u003e\n    \u003cartifactId\u003eopentracing-p6spy\u003c/artifactId\u003e\n    \u003cversion\u003e0.0.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nbuild.gradle\n```groovy\ncompile 'io.opentracing.contrib:opentracing-p6spy:0.0.1'\n```\n\n## Usage\nIf you don't already have one, create a `spy.properties` file on your resource folder (ie `src/main/resources`)\n\nAdd the tracing module in your list\n```properties\nmodulelist=io.opentracing.contrib.p6spy.TracingP6SpyFactory\ntracingPeerService=token_database\n```\n`tracingPeerService` is used to set the `peer.service` value as defined [here](https://github.com/opentracing/specification/blob/master/semantic_conventions.md).\n\n`spy.properties` is set globally to all instrumented connections. This can be limitating especially in environment accessing many databases.\nTo overcome this, you can optionally set the `tracingPeerService` in the jdbc url : \n```\njdbc:p6spy:mysql://localhost/tk_db?tracingPeerService=token_database\n```\nThis will override `spy.properties`.\n\nIn case you only want to trace calls when there is an active span, use `traceWithActiveSpanOnly`:\n```\njdbc:p6spy:mysql://localhost/tk_db?traceWithActiveSpanOnly=true\n``` \n\nBeware that some JDBC drivers do not support adding unknown properties.\n\nTips when using it in JavaEE application servers. If you happen to deploy many applications within the same application server, add the `jmxPrefix` to avoid jmx name conflict :\n```properties\nmodulelist=io.opentracing.contrib.p6spy.TracingP6SpyFactory\ntracingPeerService=token_database\njmxPrefix=authentication_service\n``` \n\nYou can find more info on p6spy [here](https://github.com/p6spy/p6spy)\n\n## Tracing tags\nThe following tags are added to traces :\n \n| Span tag name | Notes |\n|:--------------|:-------------------|\n| `span.kind` | `client` |\n| `component` | `java-p6spy` |\n| `peer.service` | if exists, the peer service name set in `spy.properties` or within the jdbc url using `tracingPeerService` |\n| `error` | `true` is any error occurred. `false` otherwise |\n| `db.type` | the authoritative part of the jdbc url (ex : `mysql` in `jdbc:mysql://localhost`) |\n| `db.statement` | the SQL query |\n| `db.instance` | the connection's catalog (can be a database name or a schema) |\n| `db.user` | if exists, the user name |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypnoce%2Fopentracing-p6spy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhypnoce%2Fopentracing-p6spy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypnoce%2Fopentracing-p6spy/lists"}