{"id":13713503,"url":"https://github.com/pinpoint-apm/go-aop-agent","last_synced_at":"2025-10-30T06:32:04.728Z","repository":{"id":38207515,"uuid":"388023283","full_name":"pinpoint-apm/go-aop-agent","owner":"pinpoint-apm","description":"https://github.com/pinpoint-apm/pinpoint-c-agent/issues","archived":false,"fork":false,"pushed_at":"2023-07-05T20:55:21.000Z","size":685,"stargazers_count":15,"open_issues_count":2,"forks_count":5,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-09-29T13:09:10.605Z","etag":null,"topics":["apm","assembly","c","go","go-aop-agent","injection","pinpoint","pinpoint-c-agent"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":false,"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/pinpoint-apm.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":"2021-07-21T06:54:05.000Z","updated_at":"2023-09-15T03:31:34.000Z","dependencies_parsed_at":"2024-06-18T22:56:42.611Z","dependency_job_id":"3d32b9e6-5422-4004-badc-beb902d82856","html_url":"https://github.com/pinpoint-apm/go-aop-agent","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinpoint-apm%2Fgo-aop-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinpoint-apm%2Fgo-aop-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinpoint-apm%2Fgo-aop-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinpoint-apm%2Fgo-aop-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinpoint-apm","download_url":"https://codeload.github.com/pinpoint-apm/go-aop-agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219856579,"owners_count":16556082,"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":["apm","assembly","c","go","go-aop-agent","injection","pinpoint","pinpoint-c-agent"],"created_at":"2024-08-02T23:01:37.986Z","updated_at":"2025-10-30T06:31:59.319Z","avatar_url":"https://github.com/pinpoint-apm.png","language":"C","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"[![Build](https://github.com/pinpoint-apm/go-aop-agent/actions/workflows/main.yml/badge.svg)](https://github.com/pinpoint-apm/go-aop-agent/actions/workflows/main.yml) [![Test libraries](https://github.com/pinpoint-apm/go-aop-agent/actions/workflows/libraries-test.yml/badge.svg)](https://github.com/pinpoint-apm/go-aop-agent/actions/workflows/libraries-test.yml) [![codecov](https://codecov.io/gh/pinpoint-apm/go-aop-agent/branch/master/graph/badge.svg?token=zeOfossRWq)](https://codecov.io/gh/pinpoint-apm/go-aop-agent)\n## Getting Started\n\n### Requirement\n\nDependency|Version| More\n---|----|----\nGO | go1.13+ | *go1.18 not support*\ncpu arch | amd64(x86_64)|\n*nux| | \n\n### Pre-requirement\n\n- [ ] Collector-Agent is online ( [How to?](https://github.com/pinpoint-apm/pinpoint-c-agent/tree/master/DOC/collector-agent#install-collector-agent)).\n- [ ] [pinpoint-c-agent](https://github.com/pinpoint-apm/pinpoint-c-agent) common library is installed( [How to?](https://github.com/pinpoint-apm/pinpoint-c-agent/tree/master/DOC/common#install-pinpoint_common)).\n- [ ] Adapting [Golang Concurrency Patterns](https://blog.golang.org/context#TOC_4.).(`Pass a Context parameter as the first argument to every function`) ⭐\n\n\n### Quicklystart\n\n1. Add `pinpoint.go` under the root of your project.\n    pinpoint.go\n    ```\n    package main\n    \n    // only import libs you cared\n    \n    import (\n        \"github.com/pinpoint-apm/go-aop-agent/common\"\n        _ \"github.com/pinpoint-apm/go-aop-agent/libs/example\"\n        _ \"github.com/pinpoint-apm/go-aop-agent/libs/httpClient\"\n        _ \"github.com/pinpoint-apm/go-aop-agent/libs/mongo\"\n        _ \"github.com/pinpoint-apm/go-aop-agent/libs/redisv8\"\n        _ \"github.com/pinpoint-apm/go-aop-agent/libs/sql\"\n    )\n    \n    func init() {\n        init_pinpoint()\n    }\n    \n    func init_pinpoint() {\n        common.Pinpoint_enable_debug_report(true) //open pinpoint debug log\n        common.Pinpoint_set_collect_agent_host(\"tcp:127.0.0.1:9999\") // set the collector agent(Installed in step of `Install Collector Agent`), it should be consistent with `PP_ADDRESS`\n        common.Pinpoint_set_trace_limit(10) // set the sample rate: `-1`: not limit, all requests with be sampled. `0`: not sample, no requets will be sampled. `n`: n requests will be sampled every seconed.\n        common.Appname = \"go-agent1\" // set Appname\n        common.Appid = \"Go-Agent1\" // set Appid\n    }\n\n    ```\n2. Import pinpoint middleware into your project(`mux` framework for example):\n    ```\n    package main\n    ...\n    import (\n    ...\n\tpinpoint \"github.com/pinpoint-apm/go-aop-agent/middleware/mux\"\n    )\n\n    router := mux.NewRouter()\n\t// add pinpoint middleware\n\trouter.Use(pinpoint.PinpointMuxMiddleWare) // \u003c-- add middleware\n    ...\n    ```\n\n3. At last, execute `go mod tidy`.\n   \n#### Build your project in `build-env`\n\n\u003e If your project deploy as docker images, use [golang-build-env-1.16](https://github.com/pinpoint-apm/pinpoint-c-agent/pkgs/container/pinpoint-c-agent%2Fgolang-build-env-1.16) as your builder image.\n\nThere are some examples in [testapps](https://github.com/pinpoint-apm/go-aop-agent/tree/master/testapps) and [CI-action](https://github.com/pinpoint-apm/go-aop-agent/blob/master/.github/workflows/main.yml), hopes these can help your ! ✨\n\n[echo framework](https://github.com/pinpoint-apm/go-aop-agent/tree/master/testapps/echo)\n\n[mux framework](https://github.com/pinpoint-apm/go-aop-agent/tree/master/testapps/mux)\n\n### ServerMap and callstack \n\n\u003e pinpoint,supports distributed tracking\n\n#### java-go-php-py-server-map\n\n![java-go-php-py-server-map](images/severmap.png)\n\n#### Callstack\n\n![Callstack](images/callstack.png)\n\n### Framework, library supported\n\nLibrary | Version\n:---: | :---:\n[net/http] | ~\n [mongo-driver/mongo]| v1.5.3\n [coreos/etcd/clientv3] |v3.3.25+incompatible\n [go-redis/redis/v8]| v8.11.0\n [database/sql]| ~\n\nFramework (middleware)| Version\n---|-----\n[mux](https://github.com/gorilla/mux) | ~\n[echo](https://github.com/labstack/echo)| v3.3.10+incompatible\n[echo](https://github.com/labstack/echo)| v4.3.0\n\n\n\u003e More libraries and frameworks is coming soon. Welcome for contribution and suggestion. \n\n## TestApps\n\nExample of `mux` and `echo` [testapp](./testapps)\n\n## License\nThis project is licensed under the Apache License, Version 2.0.\nSee [LICENSE](LICENSE) for full license text.\n\n```\nCopyright 2021-present NAVER Corp.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinpoint-apm%2Fgo-aop-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinpoint-apm%2Fgo-aop-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinpoint-apm%2Fgo-aop-agent/lists"}