{"action":"created","issue":{"url":"https://api.github.com/repos/openzipkin/brave/issues/176","repository_url":"https://api.github.com/repos/openzipkin/brave","labels_url":"https://api.github.com/repos/openzipkin/brave/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/openzipkin/brave/issues/176/comments","events_url":"https://api.github.com/repos/openzipkin/brave/issues/176/events","html_url":"https://github.com/openzipkin/brave/issues/176","id":155434629,"number":176,"title":"MySQLStatementInterceptor Reports Service Name of Binary Annotation \"sa\" as \"unknown\"","user":{"login":"tangrui","id":514845,"avatar_url":"https://avatars.githubusercontent.com/u/514845?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrui","html_url":"https://github.com/tangrui","followers_url":"https://api.github.com/users/tangrui/followers","following_url":"https://api.github.com/users/tangrui/following{/other_user}","gists_url":"https://api.github.com/users/tangrui/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrui/subscriptions","organizations_url":"https://api.github.com/users/tangrui/orgs","repos_url":"https://api.github.com/users/tangrui/repos","events_url":"https://api.github.com/users/tangrui/events{/privacy}","received_events_url":"https://api.github.com/users/tangrui/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-18T07:34:14Z","updated_at":"2016-05-18T15:26:48Z","closed_at":null,"body":"The reported data is like this:\r\n\r\n```json\r\n{\r\n      \"key\": \"sa\",\r\n      \"value\": true,\r\n      \"endpoint\": {\r\n        \"serviceName\": \"unknown\",\r\n        \"ipv4\": \"172.20.10.65\",\r\n        \"port\": 8089\r\n      }\r\n}\r\n```\r\n\r\nSince this annotation is reported by MySQLStatementInterceptor, so could this serviceName be hard coded as \"mysql\" but not 'unknown'."},"comment":{"url":"https://api.github.com/repos/openzipkin/brave/issues/comments/220063053","html_url":"https://github.com/openzipkin/brave/issues/176#issuecomment-220063053","issue_url":"https://api.github.com/repos/openzipkin/brave/issues/176","id":220063053,"user":{"login":"tangrui","id":514845,"avatar_url":"https://avatars.githubusercontent.com/u/514845?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrui","html_url":"https://github.com/tangrui","followers_url":"https://api.github.com/users/tangrui/followers","following_url":"https://api.github.com/users/tangrui/following{/other_user}","gists_url":"https://api.github.com/users/tangrui/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrui/subscriptions","organizations_url":"https://api.github.com/users/tangrui/orgs","repos_url":"https://api.github.com/users/tangrui/repos","events_url":"https://api.github.com/users/tangrui/events{/privacy}","received_events_url":"https://api.github.com/users/tangrui/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T15:26:48Z","updated_at":"2016-05-18T15:26:48Z","body":"But database name may contain hyphens too. E.g. my-fancy-db\r\n\r\nIt's better if the service name can be customised. Maybe via MySQLStatementInterceptorManagementBean initialization or providing a dummy property appended to the jdbc connection string. `?statementInterceptors=com.github.kristofa.brave.mysql.MySQLStatementInterceptor&serviceName=myService`, even though it is not standard.  "}}