This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Create a logs-*-* data stream | |
//@no-log | |
PUT {{host}}/_data_stream/logs-generic-default | |
Authorization: Basic {{username}} {{password}} | |
Content-Type: multipart/form-data; boundary=WebAppBoundary | |
### Index a document | |
//@no-log | |
POST {{host}}/logs-generic-default/_doc | |
Authorization: Basic {{username}} {{password}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.9 | |
RUN apk --no-cache add curl | |
RUN curl -L "http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=co.elastic.apm&a=elastic-apm-agent&v=LATEST" -o elastic-apm-agent.jar | |
FROM alpine:3.9 | |
RUN mkdir /usr/agent | |
COPY --from=0 elastic-apm-agent.jar /usr/agent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Build application stage | |
FROM maven:3.8.5-jdk-11 | |
WORKDIR /usr/src/java-code | |
RUN git clone https://github.com/spring-projects/spring-petclinic | |
WORKDIR /usr/src/java-code/spring-petclinic | |
RUN mvn -q -B package -DskipTests | |
RUN mkdir /usr/src/java-app | |
RUN cp -v /usr/src/java-code/spring-petclinic/target/*.jar /usr/src/java-app/app.jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: elasticsearch.k8s.elastic.co/v1 | |
kind: Elasticsearch | |
metadata: | |
name: elasticsearch | |
spec: | |
version: 7.5.1 | |
nodeSets: | |
- name: default | |
count: 3 | |
config: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Build application stage | |
FROM maven:3.8.5-jdk-11 | |
WORKDIR /usr/src/java-code | |
RUN git clone https://github.com/spring-projects/spring-petclinic | |
WORKDIR /usr/src/java-code/spring-petclinic | |
RUN mvn -q -B package -DskipTests | |
RUN mkdir /usr/src/java-app | |
RUN cp -v /usr/src/java-code/spring-petclinic/target/*.jar /usr/src/java-app/app.jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ElasticsearchRestClientInstrumentation extends ElasticApmInstrumentation { | |
private static class ElasticsearchRestClientAdvice { | |
@Advice.OnMethodEnter(suppress = Throwable.class) | |
private static void onBeforeExecute(@Advice.Argument(0) Request request, | |
@Advice.Local("span") Span span) { | |
span = tracer.getActive().createSpan() | |
.withType("db").withSubtype("elasticsearch").withAction("request") | |
.appendToName("Elasticsearch: ").appendToName(request.getMethod()) | |
.appendToName(" ").appendToName(request.getEndpoint()); | |
span.getContext().getDb().withType("elasticsearch"); |