All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dikhan.dropwizard.headermetric.resources.HelloWorldResource Maven / Gradle / Ivy

Go to download

Create metrics and send it to the preferable reporter if request header matches any of the headers configured to be measured.

There is a newer version: 3.0.0
Show newest version
package com.github.dikhan.dropwizard.headermetric.resources;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.github.dikhan.dropwizard.headermetric.annotations.TraceConfiguredHeaders;

@Path("/hello-world")
@Produces(MediaType.APPLICATION_JSON)
public class HelloWorldResource {

    @GET
    @TraceConfiguredHeaders(name = "sayHelloWorld")
    public String sayHelloWorld() {
        return "Hello World";
    }

    @GET
    @Path("/{name}")
    public String sayHelloTo(@PathParam("name") String name) {
        return "Hello " + name;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy