|
1 | | -# .NET-backend |
| 1 | +<p align="center"> |
| 2 | + <a href="https://apitally.io" target="_blank"> |
| 3 | + <picture> |
| 4 | + <source media="(prefers-color-scheme: dark)" srcset="https://assets.apitally.io/logos/logo-horizontal-new-dark.png"> |
| 5 | + <source media="(prefers-color-scheme: light)" srcset="https://assets.apitally.io/logos/logo-horizontal-new-light.png"> |
| 6 | + <img alt="Apitally logo" src="https://assets.apitally.io/logos/logo-vertical-light.png" width="220"> |
| 7 | + </picture> |
| 8 | + </a> |
| 9 | +</p> |
| 10 | +<p align="center"><b>API monitoring & analytics made simple</b></p> |
| 11 | +<p align="center" style="color: #ccc;">Real-time metrics, request logs, and alerts for your APIs — with just a few lines of code.</p> |
| 12 | +<br> |
| 13 | +<img alt="Apitally screenshots" src="https://assets.apitally.io/screenshots/overview.png"> |
| 14 | +<br> |
| 15 | + |
| 16 | +# Apitally SDK for Java |
| 17 | + |
| 18 | +[](https://github.com/apitally/apitally-java/actions) |
| 19 | +[](https://codecov.io/gh/apitally/apitally-java) |
| 20 | + |
| 21 | +This SDK for Apitally currently supports the following Java web frameworks: |
| 22 | + |
| 23 | +- [Spring Boot](https://docs.apitally.io/frameworks/spring-boot) (≥ 3.0, Java |
| 24 | + 17+) |
| 25 | + |
| 26 | +Learn more about Apitally on our 🌎 [website](https://apitally.io) or check out |
| 27 | +the 📚 [documentation](https://docs.apitally.io). |
| 28 | + |
| 29 | +## Key features |
| 30 | + |
| 31 | +### API analytics |
| 32 | + |
| 33 | +Track traffic, error and performance metrics for your API, each endpoint and |
| 34 | +individual API consumers, allowing you to make informed, data-driven engineering |
| 35 | +and product decisions. |
| 36 | + |
| 37 | +### Error tracking |
| 38 | + |
| 39 | +Understand which validation rules in your endpoints cause client errors. Capture |
| 40 | +error details and stack traces for 500 error responses, and have them linked to |
| 41 | +Sentry issues automatically. |
| 42 | + |
| 43 | +### Request logging |
| 44 | + |
| 45 | +Drill down from insights to individual requests or use powerful filtering to |
| 46 | +understand how consumers have interacted with your API. Configure exactly what |
| 47 | +is included in the logs to meet your requirements. |
| 48 | + |
| 49 | +### API monitoring & alerting |
| 50 | + |
| 51 | +Get notified immediately if something isn't right using custom alerts, synthetic |
| 52 | +uptime checks and heartbeat monitoring. Notifications can be delivered via |
| 53 | +email, Slack or Microsoft Teams. |
| 54 | + |
| 55 | +## Install |
| 56 | + |
| 57 | +Add the following dependency to your `pom.xml` file: |
| 58 | + |
| 59 | +```xml |
| 60 | +<dependency> |
| 61 | + <groupId>io.apitally</groupId> |
| 62 | + <artifactId>apitally</artifactId> |
| 63 | + <version>[0.1.0,)</version> |
| 64 | +</dependency> |
| 65 | +``` |
| 66 | + |
| 67 | +## Usage |
| 68 | + |
| 69 | +Add Apitally to your Spring Boot application using the `@UseApitally` |
| 70 | +annotation. |
| 71 | + |
| 72 | +```java |
| 73 | +import org.springframework.boot.SpringApplication; |
| 74 | +import org.springframework.boot.autoconfigure.SpringBootApplication; |
| 75 | + |
| 76 | +import io.apitally.spring.UseApitally; |
| 77 | + |
| 78 | +@UseApitally |
| 79 | +@SpringBootApplication |
| 80 | +public class Application { |
| 81 | + public static void main(String[] args) { |
| 82 | + SpringApplication.run(Application.class, args); |
| 83 | + } |
| 84 | +} |
| 85 | +``` |
| 86 | + |
| 87 | +Then add the following properties to your `application.yml` file: |
| 88 | + |
| 89 | +```yaml |
| 90 | +apitally: |
| 91 | + client-id: "your-client-id" |
| 92 | + env: "dev" # or "prod" etc. |
| 93 | +``` |
| 94 | +
|
| 95 | +For further instructions, see our |
| 96 | +[setup guide for Spring Boot](https://docs.apitally.io/frameworks/spring-boot). |
| 97 | +
|
| 98 | +## Getting help |
| 99 | +
|
| 100 | +If you need help please |
| 101 | +[create a new discussion](https://github.com/orgs/apitally/discussions/categories/q-a) |
| 102 | +on GitHub or |
| 103 | +[join our Slack workspace](https://join.slack.com/t/apitally-community/shared_invite/zt-2b3xxqhdu-9RMq2HyZbR79wtzNLoGHrg). |
| 104 | +
|
| 105 | +## License |
| 106 | +
|
| 107 | +This library is licensed under the terms of the MIT license. |
0 commit comments