DEVEL

Under the hood

What is Devel?

import { DevelApi } from '../devel-api';
import { axios } from '../utils/axios';

const apiPath = 'http://prod.apisearch.service.chidc2.consul:8080/APISearch/getAllEndpoints';
const develApi = new DevelApi();

export async function crawl() {
  const { data } = await axios.get(apiPath);
  await develApi.bulkAdd(
    data.map((obj: any) => ({
      docId: `${obj.service}.${obj.httpMethod}.${obj.path}`,
      docName: `${obj.httpMethod} ${obj.path}`,
      docDescription: obj.summary,
      docServiceName: obj.service,
      docSourceSystem: 'swagger',
      docType: obj.service,
      docUrl: obj.url,
      docTags: ['swagger', obj.type],
    }))
  );
}

Crawler Example

Finding the Related Docs 

Team, Service, People

{
  docId: 'dashboard_496',
  docName: 'amplify.SelfServe.AmeliaReports',
  docSourceSystem: 'grafana',
  docUrl: 'https://grafana.outbrain.com/d/000000496/amplify-selfserve-ameliareports',
  docType: 'dashboard',
  docTags: ['dashboard', 'grafana'],
  docUsers: ['sdahary', 'syogev']
}

AmplifySelfServe
Team

AmeliaReports

Sarit Dahary

Sivan Yogev

Algorithm for finding a team

  1. By owner

  2. By service

  3. By name

  4. By Path

  5. By Users

 

Q: Where are the teams?

A: Nowhere!

  {
    id: 'recsinfra',
    name: 'RecsInfra',
    aliases: ['recsinfra', 'appservices'],
    parentId: 'rapid',
    managerId: 'dfriedland'
  }

Setting the team Manually 

  {
    docId: 'dashboard_2135',
    docName: 'Targeting by ECR',
    docSourceSystem: 'grafana',
    docUrl: 'https://grafana.outbrain.com/d/000002135/targeting-by-ecr',
    docPath: ''
  }

Handling Manual Changes

  {
    //override doc
    docId: 'dashboard_2135',
    docOwner: 'devx',
    docIsOverride: true 
  }
  {
    //original doc
    docId: 'dashboard_2135',
    docName: 'Targeting by ECR',
    docSourceSystem: 'grafana',
    docUrl: 'https://grafana.outbrain.com/d/000002135/targeting-by-ecr',
    docPath: ''
  }
  {
    //merged doc
    docId: 'dashboard_2135',
    docName: 'Targeting by ECR',
    docSourceSystem: 'grafana',
    docUrl: 'https://grafana.outbrain.com/d/000002135/targeting-by-ecr',
    docPath: ''
    docOwner: 'devx'
  }

+

}

Adding

a Document

Search

  • Top 25 from each system

  • Fields Boost (e.g. Name > URL)

  • Systems Boost (e.g. Eco > Swagger)

  • Future: Clicks Boost, Online results from other systems

Finding Service Logs

 

  • Get the list of elastic clusters from Consul

  • Map Owner to Cluster

  • Create a link 

devel.outbrain.com

Any

Questions?

Devel project architecture

By Tsachi Shushan

Devel project architecture

  • 458