diff --git a/apm-lambda-extension/Makefile b/apm-lambda-extension/Makefile index b0339735..a69bf9bf 100644 --- a/apm-lambda-extension/Makefile +++ b/apm-lambda-extension/Makefile @@ -24,10 +24,13 @@ all: build check-licenses: go install github.com/elastic/go-licenser@v0.4.0 go run github.com/elastic/go-licenser@v0.4.0 -d . + go run github.com/elastic/go-licenser@v0.4.0 -d -ext .java . + go run github.com/elastic/go-licenser@v0.4.0 -d -ext .js . update-licenses: go install github.com/elastic/go-licenser@v0.4.0 go run github.com/elastic/go-licenser@v0.4.0 . + go run github.com/elastic/go-licenser@v0.4.0 -ext .java . lint: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.45.0 diff --git a/apm-lambda-extension/cli/.eslintrc.js b/apm-lambda-extension/cli/.eslintrc.js index 4b6b5c20..8b829906 100644 --- a/apm-lambda-extension/cli/.eslintrc.js +++ b/apm-lambda-extension/cli/.eslintrc.js @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + module.exports = { env: { browser: true, diff --git a/apm-lambda-extension/cli/build-and-publish.js b/apm-lambda-extension/cli/build-and-publish.js index b7d6781c..ecddcc69 100644 --- a/apm-lambda-extension/cli/build-and-publish.js +++ b/apm-lambda-extension/cli/build-and-publish.js @@ -6,7 +6,7 @@ // not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an diff --git a/apm-lambda-extension/cli/elastic-lambda.js b/apm-lambda-extension/cli/elastic-lambda.js index 9cdc638a..9e46fad4 100755 --- a/apm-lambda-extension/cli/elastic-lambda.js +++ b/apm-lambda-extension/cli/elastic-lambda.js @@ -1,4 +1,3 @@ -#!/usr/bin/env node // Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright @@ -7,7 +6,7 @@ // not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an diff --git a/apm-lambda-extension/cli/install.js b/apm-lambda-extension/cli/install.js index d1275cad..7b32fe5e 100644 --- a/apm-lambda-extension/cli/install.js +++ b/apm-lambda-extension/cli/install.js @@ -6,7 +6,7 @@ // not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an diff --git a/apm-lambda-extension/cli/profile.js b/apm-lambda-extension/cli/profile.js index 438cb7d9..e0a019b1 100644 --- a/apm-lambda-extension/cli/profile.js +++ b/apm-lambda-extension/cli/profile.js @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + 'use strict' const yaml = require('js-yaml') const AWS = require('aws-sdk') diff --git a/apm-lambda-extension/cli/profile/code/index.js b/apm-lambda-extension/cli/profile/code/index.js index 3b1d95a6..16f0b4c9 100644 --- a/apm-lambda-extension/cli/profile/code/index.js +++ b/apm-lambda-extension/cli/profile/code/index.js @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + exports.handler = async (event) => { const response = { statuscode: 200, diff --git a/apm-lambda-extension/cli/profile/elasticagent/index.js b/apm-lambda-extension/cli/profile/elasticagent/index.js index 945e7b11..f7c0ec8d 100644 --- a/apm-lambda-extension/cli/profile/elasticagent/index.js +++ b/apm-lambda-extension/cli/profile/elasticagent/index.js @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + const apm = require('elastic-apm-node').start({}) exports.handler = apm.lambda(function handler (event, context, callback) { return new Promise(function (resolve, reject) { diff --git a/apm-lambda-extension/cli/profile/noagent/index.js b/apm-lambda-extension/cli/profile/noagent/index.js index 3b1d95a6..16f0b4c9 100644 --- a/apm-lambda-extension/cli/profile/noagent/index.js +++ b/apm-lambda-extension/cli/profile/noagent/index.js @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + exports.handler = async (event) => { const response = { statuscode: 200, diff --git a/apm-lambda-extension/cli/tests/build-and-publish.test.js b/apm-lambda-extension/cli/tests/build-and-publish.test.js index a0b87dc5..54ff090d 100644 --- a/apm-lambda-extension/cli/tests/build-and-publish.test.js +++ b/apm-lambda-extension/cli/tests/build-and-publish.test.js @@ -6,7 +6,7 @@ // not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an diff --git a/apm-lambda-extension/cli/tests/profile.test.js b/apm-lambda-extension/cli/tests/profile.test.js index 6ea681c1..c4843c78 100644 --- a/apm-lambda-extension/cli/tests/profile.test.js +++ b/apm-lambda-extension/cli/tests/profile.test.js @@ -6,7 +6,7 @@ // not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an diff --git a/apm-lambda-extension/cli/tests/update-layer.test.js b/apm-lambda-extension/cli/tests/update-layer.test.js index d7f5683c..24a6d3e1 100644 --- a/apm-lambda-extension/cli/tests/update-layer.test.js +++ b/apm-lambda-extension/cli/tests/update-layer.test.js @@ -6,7 +6,7 @@ // not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an diff --git a/apm-lambda-extension/cli/update-function-env.js b/apm-lambda-extension/cli/update-function-env.js index d313bc36..e72cd419 100644 --- a/apm-lambda-extension/cli/update-function-env.js +++ b/apm-lambda-extension/cli/update-function-env.js @@ -6,7 +6,7 @@ // not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an diff --git a/apm-lambda-extension/cli/update-layer.js b/apm-lambda-extension/cli/update-layer.js index daf0a318..d2be6bfe 100644 --- a/apm-lambda-extension/cli/update-layer.js +++ b/apm-lambda-extension/cli/update-layer.js @@ -6,7 +6,7 @@ // not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an diff --git a/apm-lambda-extension/e2e-testing/sam-java/sam-testing-java/src/main/java/samtestingjava/App.java b/apm-lambda-extension/e2e-testing/sam-java/sam-testing-java/src/main/java/samtestingjava/App.java index 88cebf26..bf3a008b 100644 --- a/apm-lambda-extension/e2e-testing/sam-java/sam-testing-java/src/main/java/samtestingjava/App.java +++ b/apm-lambda-extension/e2e-testing/sam-java/sam-testing-java/src/main/java/samtestingjava/App.java @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + package samtestingjava; import java.io.BufferedReader; diff --git a/apm-lambda-extension/e2e-testing/sam-nodejs/sam-testing-nodejs/app.js b/apm-lambda-extension/e2e-testing/sam-nodejs/sam-testing-nodejs/app.js index 67044976..252f7117 100644 --- a/apm-lambda-extension/e2e-testing/sam-nodejs/sam-testing-nodejs/app.js +++ b/apm-lambda-extension/e2e-testing/sam-nodejs/sam-testing-nodejs/app.js @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + // const url = 'http://checkip.amazonaws.com/'; const apm = require('elastic-apm-node').start({/*...*/}) let response; diff --git a/apm-lambda-extension/e2e-testing/sam-python/sam-testing-python/app.py b/apm-lambda-extension/e2e-testing/sam-python/sam-testing-python/app.py index cf356f37..ddb5f60a 100644 --- a/apm-lambda-extension/e2e-testing/sam-python/sam-testing-python/app.py +++ b/apm-lambda-extension/e2e-testing/sam-python/sam-testing-python/app.py @@ -1,3 +1,22 @@ +#!/usr/bin/env python + +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http:#www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + import json import os