Commit defb278
update AI provider documentation (#2897)
* feat: add prometheus monitoring wrapper
Reintroduces the Prometheus metrics wrapper previously available in the
plugins repository, updated for go-micro v5. Exposes request count and
latency histograms for handlers, subscribers, and outgoing client calls
via NewHandlerWrapper, NewSubscriberWrapper, NewCallWrapper and
NewClientWrapper, labelled with service/endpoint/status.
Options cover namespace, subsystem, const labels, histogram buckets and
a custom registerer; duplicate collectors (e.g. from multiple wrappers
sharing the same config) are reused transparently via a cached
metrics bundle.
Fixes #2893
* fix(registry/etcd): clear lease/register caches on KeepAlive channel closure
When the etcd client's long-lived KeepAlive channel closes (e.g. because
the lease expired on the server side during a network partition), the
previous cleanup only removed the channel bookkeeping. The stale entries
in `leases` and `register` caused the next registerNode() heartbeat to
hit the "unchanged hash" short-circuit and skip re-registration entirely,
so the service permanently disappeared from etcd.
Extract the cleanup into handleKeepAliveClosed and also drop the cached
lease id and hash so the next heartbeat performs a full Grant+Put and
the service recovers within one RegisterInterval.
Regression introduced by #2822; fix is symmetric with the existing
synchronous KeepAliveOnce recovery path that propagates
rpctypes.ErrLeaseNotFound.
* docs: add AI provider integration guide and Supported AI Providers section
Add a step-by-step guide for AI infrastructure companies to implement
ai.Model and contribute a provider to go-micro. Covers the full
lifecycle: skeleton, tool call handling, tests, registration, and PR
checklist.
Add a "Supported AI Providers" section to the project README that lists
current providers (Anthropic, OpenAI) in a table and links to the
integration guide with a call-to-action for new providers and sponsors.
Streamline the "Adding a New Provider" section in ai/README.md to point
to the new guide instead of duplicating a full code listing.
* Update contribution guidelines in README.md
Removed Discord contact information for platform contributions.
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 15cc876 commit defb278
3 files changed
Lines changed: 383 additions & 58 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
| |||
388 | 389 | | |
389 | 390 | | |
390 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
391 | 412 | | |
392 | 413 | | |
393 | 414 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
| 170 | + | |
184 | 171 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
227 | 176 | | |
228 | 177 | | |
229 | | - | |
| 178 | + | |
230 | 179 | | |
231 | 180 | | |
| 181 | + | |
| 182 | + | |
232 | 183 | | |
233 | 184 | | |
234 | 185 | | |
| |||
0 commit comments