LogoLogo
WebsiteGithubDiscord
  • 🚀Getting Started
    • Ostara 101
    • Why Ostara
    • Quick Start
    • Privacy
    • Changelog
  • 📖Documentation
    • Folders
      • Creating / Updating Folders
    • Agents
      • Agent Version Compatibility Matrix
      • Configuration
        • Service Discovery
          • Internal
          • Kubernetes
          • ZooKeeper
      • Installation
        • Mac/Linux
        • Kubernetes
    • Applications
      • Creating / Updating Applications
    • Instances
      • Creating / Updating Instances
    • Authentication Settings
      • Types
        • None
        • Inherit
        • Basic
        • Bearer Token
        • Header
        • Query String
  • 📗Features
    • Abilities
    • Folder Features
      • Overview
        • Dashboard
        • Applications
    • Agent Features
      • Overview
        • Dashboard
    • Application Features
      • Overview
        • Dashboard
        • Instances
      • Manage
        • Loggers
        • Caches
      • Monitor
        • Metric Notifications
        • Health Notifications
    • Instance Features
      • Insights
        • Dashboard
        • Health
        • Info
        • Metrics
        • System Environment
        • System Properties
        • App Properties
        • Beans
        • HTTP Requests
        • Quartz
        • Scheduled Tasks
        • Mappings
        • Flyway
        • Liquibase
        • Integration Graph
      • Manage
        • Loggers
        • Logfile
        • Caches
        • Togglz
      • JVM
        • Thread Profiling
        • Heap Dump
      • Misc
        • Shutdown
    • In-App Demo
    • Local Backups
  • ⚠️Troubleshooting
    • Connecting to Agents
      • Service Discovery
    • No data for Info
    • Environment variables / System properties / App properties are partially or fully masked
    • Not all requests appear in HTTP Requests
    • Known Issues for Spring Boot 2
Powered by GitBook
On this page

Was this helpful?

  1. Documentation
  2. Agents
  3. Configuration
  4. Service Discovery

Internal

Internal service discovery is a self discovery mechanism which allows you to integrate your Spring applications with Ostara via a simple dependency.

This type of service discovery is only supported for Spring Boot 3 and above, and requires Java 17 and above.

Setup

Add the following dependency to your project:

The client dependency goes by the same version as Ostara

Gradle (Kotlin)
implementation("dev.ostara:spring-client:VERSION")
Gradle (Groovy)
implementation 'dev.ostara:spring-client:VERSION'
Maven
<dependency>
    <groupId>dev.ostara</groupId>
    <artifactId>spring-client</artifactId>
    <version>VERSION</version>
</dependency>

After adding the dependency, you must set the following configuration:

Yaml
ostara:
    client:
        agent-url: # The URL of the Agent installed in your environment
        api-key: # The API key defined in the Agent, required if using SSL
        application-name: # The name of the Application to be displayed in Ostara, if not set, defaults to spring.application.name
Properties
ostara.client.agent-url= // The URL of the Agent installed in your environment
ostara.client.api-key= // The API key defined in the Agent, required if using SSL
ostara.client.application-name= // The name of the Application to be displayed in Ostara, if not set, defaults to spring.application.name

Finally, add the @EnableOstaraClient annotation to any configuration bean:

@EnableOstaraClient
@SpringBootApplication
public class Application {
	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}
}
PreviousService DiscoveryNextKubernetes

Last updated 1 year ago

Was this helpful?

📖